FAQ

Search Discussions

203 discussions - 1,243 posts

  • Hi, I have a requirement. There are files in the parent directory and they are touched in the child directory. So in child directory there are 0 byte files having the same name as the ones in the ...
    Mihir KamdarMihir Kamdar
    Aug 2, 2007 at 9:35 am
    Aug 8, 2007 at 8:48 pm
  • Why doesn't this work? I want to take any leading or trailing white spaces out. If I remove the remark it works, but I do not understand why it requires the second line Script: #!/usr/bin/perl use ...
    Tony HealTony Heal
    Aug 2, 2007 at 8:48 pm
    Aug 22, 2007 at 2:26 am
  • Hi, I want to implement longest prefix match in my code in perl, but am not able to get started with it. I am sure, it can be easily achieved with the help of regex in perl, but I haven't worked on ...
    Mihir KamdarMihir Kamdar
    Aug 27, 2007 at 5:18 am
    Aug 27, 2007 at 7:46 pm
  • After some friendly input from yitzle I might have moved further with my library. This is my script. script.pl #!/usr/bin/perl #require 'lib.pl'; @userArray = <STDIN ; $sum = sumIt(@userArray); print ...
    Amichai TeumimAmichai Teumim
    Aug 3, 2007 at 10:04 am
    Aug 7, 2007 at 10:26 am
  • Hi , I want to redirect to a different url with the parameters in the post method. Any help is appreciated. Thanks in advance, Praveena
    Praveena VittalPraveena Vittal
    Aug 25, 2007 at 6:35 am
    Nov 5, 2007 at 9:52 pm
  • Hello. The following code example creates a list of regular files in a directory. Using File::Find, I'm unable to localize an array to hold the list of files. Is there a way to create the list with a ...
    Dan SopherDan Sopher
    Aug 16, 2007 at 10:45 pm
    Aug 19, 2007 at 11:52 am
  • How do i use it? Can it replace the search program in MS XP.. Can i get an example of an element in the @directories
    SomuSomu
    Aug 20, 2007 at 3:06 pm
    Sep 1, 2007 at 2:00 pm
  • Hi, I have a requirement to read each of the files from a directory and pass each one of them as a parameter to my perl script one by one. The requirement is such that my perl script should keep ...
    Mihir KamdarMihir Kamdar
    Aug 1, 2007 at 1:56 pm
    Aug 8, 2007 at 10:53 pm
  • I'm working on yet another exercise from Intermediate Perl. I've been given a script that searches for files that fall between a two timestamps. For the exercise, I am supposed to write the ...
    ChrisChris
    Aug 25, 2007 at 5:49 pm
    Aug 27, 2007 at 10:40 pm
  • Hi I'm trying to understand subroutines. #!/usr/bin/perl &marine() sub marine { $n += 1; #Global variable $n print "Hello, sailor number $n!\n"; } This doesn't work. Is &marine() incorrect? How would ...
    Amichai TeumimAmichai Teumim
    Aug 30, 2007 at 7:39 am
    Aug 31, 2007 at 10:30 pm
  • I'm reading the book Programming the Perl DBI to start work with databases. The DBI portion I'm getting OK, but I find the reference here to @$ confusing. (This code is based from the book.) my $sth1 ...
    Petelink1Petelink1
    Aug 17, 2007 at 9:09 pm
    Aug 25, 2007 at 10:47 am
  • Greetings; I have, conservatively, dozens of html files to change. I can find them and pass the file name to perl and do the usual s/// changes but there is one change I can't figure out. There is a ...
    Dennis G. WicksDennis G. Wicks
    Aug 15, 2007 at 4:45 pm
    Aug 16, 2007 at 11:00 pm
  • Hi, I am trying to count the number of lines in my output file processed by a perl code. I am not getting the syntax correct. I am doing something like below:- my $count1 = `wc -l < $OUT_FILE` ; ...
    Mihir KamdarMihir Kamdar
    Aug 7, 2007 at 3:53 pm
    Aug 8, 2007 at 12:32 pm
  • Hi, I have a csv file. I wanted to do some calculations on some of its fields, like multiplying the 7th field with the 13th field and overwriting the 13th field with the answer of my calculation. ...
    Mihir KamdarMihir Kamdar
    Aug 24, 2007 at 6:44 am
    Aug 28, 2007 at 3:32 pm
  • Hello there! Have question if that is possible to empty a few arrays with one simple command? For the moment I clear these six tables by assigning them an empty list: @bitmap_addr_lo = (); ...
    DJ GrubyDJ Gruby
    Aug 14, 2007 at 8:54 pm
    Aug 15, 2007 at 4:30 pm
  • Does die call exit when it's excuted? If so,when I overwrote exit() function in my script,would die call this customized exit? I gave a test,but didn't see die calling exit distinctly. This works as ...
    Jeff PangJeff Pang
    Aug 13, 2007 at 7:29 am
    Aug 15, 2007 at 3:51 pm
  • Morning All, I've a relatively minor problem that has been giving me a headache for several days. I know there are many other ways to do this, however I'd like to know why this isn't working. The ...
    ThemachinatorThemachinator
    Aug 10, 2007 at 10:27 am
    Aug 11, 2007 at 11:15 am
  • Hi, Need your help with the following:- I have a csv file having many records. I want to remove duplicate records. But the record might not be entirely duplicate. I only have to check if the 2nd, ...
    Mihir KamdarMihir Kamdar
    Aug 1, 2007 at 10:33 am
    Aug 2, 2007 at 11:30 pm
  • Hi, I want all the output plus any error messages to got to a log file. I used the BEGIN block to direct STDERR into the file: BEGIN { open(STDERR, " /usr/local/myreports/report.log") || die "Can't ...
    BeginnerBeginner
    Aug 30, 2007 at 9:33 am
    Sep 1, 2007 at 2:09 pm
  • Hello, In many languages there is a function for convert int for string. Ho I can do it in Perl ? Best regards, Rodrigo Faria Flickr agora em português. Você clica, todo mundo vê. ...
    Rodrigo TavaresRodrigo Tavares
    Aug 25, 2007 at 4:56 pm
    Aug 26, 2007 at 2:58 pm
  • I need to have a package level variable. For that I am using the following method: package XYZ; $XYZ::db_initialised = 0; sub init_db() { DB::init() unless $XYZ::db_initialized; $XYZ::db_initialized ...
    SundeepSundeep
    Aug 24, 2007 at 6:15 am
    Aug 25, 2007 at 2:20 am
  • Sorry for the "not sure where to even begin" nature of this email, but I am stuck. I am trying to put together a aggregating script that takes daily climate data and produces monthly averages. For ...
    Kirk WythersKirk Wythers
    Aug 23, 2007 at 8:51 pm
    Aug 24, 2007 at 11:41 pm
  • I am working a script that is a solution to a problem in Intermediate Perl. Here is the script: #!/usr/bin/perl -w use strict; sub check_items_for_all { my $all_ref = @_; my @who = keys %$all_ref; my ...
    ChrisChris
    Aug 22, 2007 at 4:44 am
    Aug 23, 2007 at 5:52 pm
  • Hello list, Just be curious to see how do you guys use Perl for work.Would you be pleased to give a vote below? [a] CGI/Web Development [b] System Administration [c] mod_perl -- write Apache handler ...
    PennyyhPennyyh
    Aug 9, 2007 at 4:28 am
    Aug 9, 2007 at 5:05 pm
  • Greets. I have a 'config file' that contains a group name (alphanumeric) and machine name/numbers separated by whitespace. Each group is on it's own line. The file looks like this: prod01 456 345 234 ...
    Justin The CynicalJustin The Cynical
    Aug 23, 2007 at 6:00 am
    Aug 30, 2007 at 1:50 am
  • I have a piece of code that I am assured works and I cannot see why it would. Code is supposed to force undefined, zero and all space to numeric zero to stop printf being undefined. foreach my $value ...
    Ken FoskeyKen Foskey
    Aug 20, 2007 at 2:48 pm
    Aug 27, 2007 at 10:40 pm
  • Hi all, I have a hash and some prose text and want my perl to identify the keys of the hash in this text and replace them with the corresponding values of the keys. I tried the following foreach ...
    Petra Vide OgrinPetra Vide Ogrin
    Aug 27, 2007 at 9:03 am
    Aug 27, 2007 at 8:54 pm
  • Hi, I am new to Perl. I am trying to replace a string within a bunch of html files. Ideally, I would like to have the file name pulled from a list in a text file, open the file, search for the string ...
    Kevc73Kevc73
    Aug 9, 2007 at 3:13 pm
    Aug 16, 2007 at 9:32 pm
  • Trying to understand from perldoc perldata the diff between these 3 CLIs and why the 2nd CLI has no elements? $ perl -le 'use Data::Dumper; @c = (0,1)[1]; print Dumper(\@c);' $VAR1 = [ 1 ]; $ perl ...
    Oryann9Oryann9
    Aug 8, 2007 at 8:44 pm
    Aug 14, 2007 at 11:23 pm
  • Is there some variable that will do for a file what $/ does for a record? What I mean is that in $s=<STDIN the value of $s depends on the value of $/, but in @arr=<STDIN I couldn't find a way to ...
    Jorge AlmeidaJorge Almeida
    Aug 5, 2007 at 12:21 pm
    Aug 6, 2007 at 8:50 pm
  • Hi Guys, I have used the following code to print the log files. but nothing is printed even it doesn't show the warning message, no prompt is returned. what is the mistake in code , could u help me ...
    SivasakthiSivasakthi
    Aug 29, 2007 at 9:40 am
    Aug 29, 2007 at 9:40 pm
  • Hi All, I have installed Net:SFTP on my UNIX (SOLARIS) machine. I have generated the Public and Private key pair. I have installed the Public on my remote machine with the server as OpenSSH. All the ...
    Kilaru rajeevKilaru rajeev
    Aug 16, 2007 at 5:28 am
    Aug 27, 2007 at 1:41 pm
  • Hi all, I have a file that I need to use the substitute operator on to get rid of spaces, and apostrophes and such. The only way I can think of doing it is this: 1. Open the file and go through it ...
    Yoyoyo YoyoyoyoYoyoyo Yoyoyoyo
    Aug 24, 2007 at 2:26 am
    Aug 25, 2007 at 4:52 am
  • Need to get the individual who created the file I am looking at. I am using File::Find to get all files that are 4 days or younger. I can get all info: Path, file name, file size, date modified ...
    Wagner, David --- Senior Programmer Analyst --- WGOWagner, David --- Senior Programmer Analyst --- WGO
    Aug 22, 2007 at 4:46 pm
    Aug 23, 2007 at 4:20 pm
  • i have two files ###########callbacks.pm############### sub foo{ return "foo"; } sub bar{ return "foo"; } 1; ################# ############main.pl############## #!/usr/bin/perl #PSUDO CODE# #open ...
    Chris PaxChris Pax
    Aug 11, 2007 at 11:25 pm
    Aug 14, 2007 at 2:26 am
  • Hi, I want to convert a huge XML file into an inMemory Hash. I tried using XML::Simple. But its taking huge memory space and time to convert it into Hash. While loading a XML file of 300MB its taking ...
    Prabu AyyappanPrabu Ayyappan
    Aug 1, 2007 at 6:51 am
    Aug 4, 2007 at 5:51 pm
  • Im not sure where to post this as Im really looking for the functionality not specifically that it have to be in the perl language. How would I make something that would automatically open the ...
    HorizxonHorizxon
    Aug 3, 2007 at 10:50 pm
    Aug 6, 2007 at 9:56 pm
  • Hi all, I have the following perl script that copies files from one folder to another: use File::Copy; my $filename = 'gar'; for my $file ( <*.$filename ) { # copy each individual file move($file, ...
    EvynEvyn
    Aug 8, 2007 at 9:55 pm
    Aug 10, 2007 at 2:29 am
  • Is it possible to pass timelocal a parameter that's already the exact scalar output of localtime's format "Mon Jan 10 04:30:30 2007"? I know the perlfunc documentations for timelocal indicates that ...
    TimboTimbo
    Aug 8, 2007 at 5:48 am
    Aug 9, 2007 at 1:54 pm
  • Hi all, I am trying a one-liner substitution for a content in a file. original file content --------- signal TCLK_IN : std_logic; signal TPOS_IN : std_logic; --------- I want to change it as: ...
    Krishnan HariharanKrishnan Hariharan
    Aug 31, 2007 at 3:09 am
    Aug 31, 2007 at 3:36 pm
  • Hello! I am trying to write a simple Perl script to edit a file using two other source files named infra_east.txt and infra_west.txt. Please excuse my ignorance on this. I am sure there are much ...
    MojorisingMojorising
    Aug 28, 2007 at 12:45 am
    Aug 29, 2007 at 7:20 pm
  • Hi all, I am a newbie in this forum and Perl too ;-) I am trying writing script transfering files using module Net::SFTP::Foreign. I need to retrieve from remote directory only names of files (not ...
    Marian BednarMarian Bednar
    Aug 24, 2007 at 12:57 pm
    Aug 27, 2007 at 11:45 am
  • Aside from the syntax, is there a difference in the way 'map' and 'foreach' process?
    Dan SopherDan Sopher
    Aug 24, 2007 at 6:21 pm
    Aug 25, 2007 at 4:31 am
  • Hi! I'm trying to get back into Perl again by working through Intermediate Perl. Unfortunately, the Perl part of my brain has atrophied! I'm working on the second exercise of the second chapter. I'm ...
    Christopher SpearsChristopher Spears
    Aug 21, 2007 at 3:28 am
    Aug 24, 2007 at 7:05 am
  • I want to read from a pipe in my perl script invoked like: date | perl myperlscript.pl I understand that this puts the text outputted from the date program into the stdin. How could I check the ...
    HorizxonHorizxon
    Aug 13, 2007 at 7:28 pm
    Aug 15, 2007 at 6:10 pm
  • I typically "use Carp;" and change my "die" and "warn" statements to "croak" and "carp". I have read a couple places croak/carp are a little better at telling you what and where than the standard ...
    Robert HicksRobert Hicks
    Aug 13, 2007 at 6:46 pm
    Aug 14, 2007 at 11:08 pm
  • Hi Is there any way to update the specified line in the file with the new line without having to copy the entire contents once again. Since the file is huge, i dont want to re-write the file. Can ...
    SubhashSubhash
    Aug 8, 2007 at 2:42 pm
    Aug 13, 2007 at 4:37 pm
  • Hi Guys, I have a very large file. It may be contain 1lac lines.. also it length is increased in dynamically.. Each time ( per 5 min) i need to read the contents from file & do some work .. Suppose i ...
    SivasakthiSivasakthi
    Aug 8, 2007 at 12:08 pm
    Aug 13, 2007 at 10:08 am
  • I'm not sure if I've asked the correct lists,but hope I can get some helps here.:) I need a mod_rewrite rule,rewrite this url: http://abc.site.com/index.php?q1=v1 to: ...
    PennyyhPennyyh
    Aug 10, 2007 at 9:53 am
    Aug 10, 2007 at 10:39 am
  • Hi all, I wrote a simple perl script to check some variables in SHOW STATUS in a mysql server. Now, how do I run it as a service/daemon? I want more flexibility than crontab which is based on time. ...
    Toddy PrawiraharjoToddy Prawiraharjo
    Aug 8, 2007 at 12:13 pm
    Aug 8, 2007 at 9:25 pm
Group Navigation
period‹ prev | Aug 2007 | next ›
Group Overview
groupbeginners @
categoriesperl
discussions203
posts1,243
users198
websiteperl.org

198 users for August 2007

Chas Owens: 158 posts Paul Lalli: 81 posts Mr. Shawn H. Corey: 76 posts Jeff Pang: 52 posts John W. Krahn: 45 posts Dr.Ruud: 38 posts Mihir Kamdar: 38 posts Gunnar Hjalmarsson: 35 posts Jeff Pang: 32 posts Rob Dixon: 22 posts Randal L. Schwartz: 21 posts Tom Phoenix: 19 posts Ken Foskey: 17 posts Mumia W.: 17 posts Xavier Noria: 15 posts Yitzle: 15 posts Nobull67: 14 posts Jenda Krynicky: 13 posts Mathew Snyder: 13 posts Jay Savage: 12 posts
show more
Archives