Search Discussions
-
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 Kamdar
Aug 2, 2007 at 9:35 am
Aug 8, 2007 at 8:48 pm -
28
regex help
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 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 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 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 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 Sopher
Aug 16, 2007 at 10:45 pm
Aug 19, 2007 at 11:52 am -
20
File::Find
How do i use it? Can it replace the search program in MS XP.. Can i get an example of an element in the @directoriesSomu
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 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 ...
Chris
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 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 ...
Petelink1
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. 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 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 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 Gruby
Aug 14, 2007 at 8:54 pm
Aug 15, 2007 at 4:30 pm -
13
die and exit
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 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 ...
Themachinator
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 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 ...
Beginner
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 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 ...
Sundeep
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 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 ...
Chris
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 ...
Pennyyh
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 Cynical
Aug 23, 2007 at 6:00 am
Aug 30, 2007 at 1:50 am -
11
modification
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 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 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 ...
Kevc73
Aug 9, 2007 at 3:13 pm
Aug 16, 2007 at 9:32 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 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 ...
Sivasakthi
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 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 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 --- 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 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 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 ...
Horizxon
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, ...
Evyn
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 ...
Timbo
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 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 ...
Mojorising
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 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 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 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 ...
Horizxon
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 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 ...
Subhash
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 ...
Sivasakthi
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: ...
Pennyyh
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 Prawiraharjo
Aug 8, 2007 at 12:13 pm
Aug 8, 2007 at 9:25 pm
198 users for August 2007
Archives
- May 2016 (29)
- March 2016 (38)
- February 2016 (66)
- January 2016 (62)
- December 2015 (36)
- November 2015 (59)
- October 2015 (35)
- September 2015 (32)
- April 2015 (18)
- March 2015 (101)
- February 2015 (74)
- January 2015 (99)
- December 2014 (74)
- November 2014 (65)
- October 2014 (47)
- September 2014 (66)
- August 2014 (68)
- July 2014 (171)
- June 2014 (85)
- May 2014 (126)
- April 2014 (36)
- March 2014 (162)
- February 2014 (154)
- January 2014 (94)
- December 2013 (42)
- November 2013 (71)
- October 2013 (192)
- September 2013 (143)
- August 2013 (114)
- July 2013 (141)
- June 2013 (201)
- May 2013 (163)
- April 2013 (90)
- March 2013 (125)
- February 2013 (150)
- January 2013 (185)
- December 2012 (120)
- November 2012 (101)
- October 2012 (117)
- September 2012 (180)
- August 2012 (319)
- July 2012 (170)
- June 2012 (223)
- May 2012 (249)
- April 2012 (298)
- March 2012 (311)
- February 2012 (261)
- January 2012 (155)
- December 2011 (282)
- November 2011 (266)
- October 2011 (316)
- September 2011 (369)
- August 2011 (371)
- July 2011 (310)
- June 2011 (392)
- May 2011 (434)
- April 2011 (630)
- March 2011 (440)
- February 2011 (282)
- January 2011 (419)
- December 2010 (319)
- November 2010 (314)
- October 2010 (360)
- September 2010 (256)
- August 2010 (223)
- July 2010 (340)
- June 2010 (298)
- May 2010 (483)
- April 2010 (683)
- March 2010 (480)
- February 2010 (339)
- January 2010 (322)
- December 2009 (531)
- November 2009 (558)
- October 2009 (375)
- September 2009 (449)
- August 2009 (497)
- July 2009 (428)
- June 2009 (306)
- May 2009 (293)
- April 2009 (362)
- March 2009 (477)
- February 2009 (467)
- January 2009 (408)
- December 2008 (405)
- November 2008 (545)
- October 2008 (770)
- September 2008 (662)
- August 2008 (663)
- July 2008 (773)
- June 2008 (730)
- May 2008 (650)
- April 2008 (791)
- March 2008 (692)
- February 2008 (399)
- January 2008 (694)
- December 2007 (581)
- November 2007 (688)
- October 2007 (882)
- September 2007 (709)
- August 2007 (1,243)
- July 2007 (849)
- June 2007 (898)
- May 2007 (796)
- April 2007 (587)
- March 2007 (705)
- February 2007 (521)
- January 2007 (578)
- December 2006 (565)
- November 2006 (555)
- October 2006 (704)
- September 2006 (734)
- August 2006 (725)
- July 2006 (884)
- June 2006 (681)
- May 2006 (703)
- April 2006 (889)
- March 2006 (724)
- February 2006 (607)
- January 2006 (588)
- December 2005 (684)
- November 2005 (664)
- October 2005 (682)
- September 2005 (616)
- August 2005 (743)
- July 2005 (716)
- June 2005 (670)
- May 2005 (809)
- April 2005 (830)
- March 2005 (1,020)
- February 2005 (740)
- January 2005 (784)
- December 2004 (873)
- November 2004 (910)
- October 2004 (1,242)
- September 2004 (936)
- August 2004 (911)
- July 2004 (1,101)
- June 2004 (1,026)
- May 2004 (945)
- April 2004 (1,161)
- March 2004 (1,485)
- February 2004 (1,608)
- January 2004 (1,512)
- December 2003 (1,607)
- November 2003 (1,437)
- October 2003 (1,314)
- September 2003 (1,382)
- August 2003 (1,351)
- July 2003 (1,559)
- June 2003 (1,576)
- May 2003 (1,586)
- April 2003 (1,600)
- March 2003 (1,731)
- February 2003 (1,641)
- January 2003 (2,020)
- December 2002 (1,360)
- November 2002 (1,198)
- October 2002 (1,677)
- September 2002 (1,905)
- August 2002 (1,685)
- July 2002 (1,975)
- June 2002 (1,900)
- May 2002 (2,332)
- April 2002 (2,098)
- March 2002 (1,658)
- February 2002 (2,237)
- January 2002 (2,304)
- December 2001 (1,568)
- November 2001 (1,823)
- October 2001 (1,712)
- September 2001 (1,289)
- August 2001 (1,993)
- July 2001 (2,424)
- June 2001 (3,399)
- May 2001 (1,797)
- April 2001 (650)