Weekly list FAQ posting

2004-03-29 Thread casey
NAME beginners-faq - FAQ for the beginners-cgi mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to [EMAIL PROTECTED] You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email

Active 'back' buttons

2004-03-29 Thread Rob Dixon
Hi guys. What's the 'usual' way (if there is one) of implementing an 'active' back button (which does the equivalent of the browser's back button but is implemented in CGI code)? If, say, I'm doing a database search and come up with a list of records, each of which can be clicked on to provide

Re: Streaming a file to a remote user

2004-03-29 Thread Shaun Fryer
4. Decoded file is streamed to user, who saves the file locally. Jason Below I've provided a starting point to answer your 4th question anyway. It doesn't have a proper strict style or complete error reporting, but it does work (last I checked) and should get you started. --

CGI module comparison

2004-03-29 Thread John Goodleaf
Hello, I'm not on the list, so please CC me directly. Although I'm a reasonably competent Perl user I have never actually used it for CGI purposes, just for database querying/data munging. You can imagine my perpetual confusion at finding the Perl books in the Web programming section of the

Re: Active 'back' buttons

2004-03-29 Thread Andrew Gaffney
Rob Dixon wrote: Hi guys. What's the 'usual' way (if there is one) of implementing an 'active' back button (which does the equivalent of the browser's back button but is implemented in CGI code)? If, say, I'm doing a database search and come up with a list of records, each of which can be clicked

RE: Active 'back' buttons

2004-03-29 Thread Kipp, James
Hi guys. What's the 'usual' way (if there is one) of implementing an 'active' back button (which does the equivalent of the browser's back button but is implemented in CGI code)? It is usually done with javascript and pretty easy to do. Although you may already be aware of this and

Re: CGI module comparison

2004-03-29 Thread Andrew Gaffney
John Goodleaf wrote: Hello, I'm not on the list, so please CC me directly. Although I'm a reasonably competent Perl user I have never actually used it for CGI purposes, just for database querying/data munging. You can imagine my perpetual confusion at finding the Perl books in the Web programming

Re: Streaming a file to a remote user

2004-03-29 Thread Shaun Fryer
4. Decoded file is streamed to user, who saves the file locally. Jason Below I've provided a starting point to answer your 4th question anyway. It doesn't have a proper strict style or complete error reporting, but it does work (last I checked) and should get you started. --

RE: GD Install Failure (was: Re: elsif issues ....still)

2004-03-29 Thread Allen Wang
-Original Message- From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 6:11 PM To: Allen Wang Cc: [EMAIL PROTECTED] Subject: Re: GD Install Failure (was: Re: elsif issues still) Please bottom post... Allen Wang wrote: The first error message should be

Dealing with 'special characters'

2004-03-29 Thread Howard Fuchs
Hi all: Here is my problem. I have a script which processes input from a textarea which may have 'special characters' in it like or etc. Unfortunately what I am getting back are these or respectively. Script snippet start-- use CGI qw/:standard/; print Content-type:

Calendar HTML Form

2004-03-29 Thread B McKee
Good Afternoon All I'm overhauling the website I run for a men's rec slopitch league. It's all CGI.pm and mySQL. I'm adding a section to reschedule rain-out games. I want the users to pick the new date from a 'calendar'. I think this will be a more natural interface than drop-down

Re: Calendar HTML Form

2004-03-29 Thread Owen
On Mon, 29 Mar 2004 16:18:29 -0500 B McKee [EMAIL PROTECTED] wrote: Good Afternoon All I'm overhauling the website I run for a men's rec slopitch league. It's all CGI.pm and mySQL. I'm adding a section to reschedule rain-out games. I want the users to pick the new date from a

RE: Calendar HTML Form

2004-03-29 Thread Charles K. Clarkson
B McKee [EMAIL PROTECTED] wrote: : : I'm overhauling the website I run for a men's rec : slopitch league. It's all CGI.pm and mySQL. I'm : adding a section to reschedule rain-out games. I want : the users to pick the new date from a 'calendar'. : I think this will be a more natural

Re: GD Install Failure (was: Re: elsif issues ....still)

2004-03-29 Thread Wiggins d'Anconia
Allen Wang wrote: -Original Message- From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 6:11 PM To: Allen Wang Cc: [EMAIL PROTECTED] Subject: Re: GD Install Failure (was: Re: elsif issues still) Please bottom post... Allen Wang wrote: The first error

Re: CGI module comparison

2004-03-29 Thread Wiggins d'Anconia
Andrew Gaffney wrote: John Goodleaf wrote: Hello, I'm not on the list, so please CC me directly. Although I'm a reasonably competent Perl user I have never actually used it for CGI purposes, just for database querying/data munging. You can imagine my perpetual confusion at finding the Perl books

Re: Active 'back' buttons

2004-03-29 Thread Wiggins d'Anconia
Rob Dixon wrote: Hi guys. What's the 'usual' way (if there is one) of implementing an 'active' back button (which does the equivalent of the browser's back button but is implemented in CGI code)? If, say, I'm doing a database search and come up with a list of records, each of which can be clicked

Re: AW: Apache::Session question

2004-03-29 Thread Wiggins d'Anconia
Please bottom post... B. Fongo wrote: The error occurs on initial call, so id should be empty be then. I expect the routine to open a new session (see code below) if session_id is empty - but it fails then. == my $dbh = dbConnect(); # Get

Output Unicode

2004-03-29 Thread Octavian Rasnita
Hi all, Does anyone know how could I print a UTF-8 HTML page (like Google's one)? Which modules I need to use? Is perl able to do that? Thank you. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Sending email a HTML page

2004-03-29 Thread John
I want to send HTML file via MIME::Lite Is that practicable?

string change problem

2004-03-29 Thread MuthuKumar
Hai all. I want to make a script which converts like (pErl1234test = perl).I wrote like #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/; #change 2

Re: string change problem

2004-03-29 Thread Smoot Carl-Mitchell
On Mon, 29 Mar 2004 15:05:34 +0530 MuthuKumar [EMAIL PROTECTED] wrote: Hai all. I want to make a script which converts like (pErl1234test = perl).I wrote like #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name

Weekly list FAQ posting

2004-03-29 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to [EMAIL PROTECTED] You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Incrementing count

2004-03-29 Thread Jimstone77
I'm sorry, the previous subject should have been changed. My apologies. while (FILE) { $counter++; } I know this is probably simple, but how would I increment by 20? In other words, $counter would increment 1 time for every twenty lines of the file? Any help would be appreciated.

Re: interpolated strings

2004-03-29 Thread Jimstone77
while (FILE) { $counter++; } I know this is probably simple, but how would I increment by 20? In other words, $counter would increment 1 time for every twenty lines of the file? Any help would be appreciated.

Re: Incrementing count

2004-03-29 Thread Chance Ervin
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 29, 2004 6:20 AM Subject: Incrementing count I'm sorry, the previous subject should have been changed. My apologies. while (FILE) { $counter++; } I know this is probably simple, but how

Re: string change problem

2004-03-29 Thread James Edward Gray II
On Mar 29, 2004, at 3:35 AM, MuthuKumar wrote: Hai all. Howdy. I want to make a script which converts like (pErl1234test = perl).I wrote like #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name You are missing semi-colons on all three

Re: Sending email a HTML page

2004-03-29 Thread Paul D. Kraus
You just attach the html page? If you want to actually send an html email that is different and you should perldoc MIME::Lite. Html mail is blocked on a lot of peoples systems. I for one will not even open a message that is not plain text. Just a suggestion. Paul On Monday 29 March 2004 02:59

Re: Incrementing count

2004-03-29 Thread James Edward Gray II
On Mar 29, 2004, at 8:20 AM, [EMAIL PROTECTED] wrote: I'm sorry, the previous subject should have been changed. My apologies. while (FILE) { $counter++; } I know this is probably simple, but how would I increment by 20? In other words, $counter would increment 1 time for every twenty lines

Re: string change problem

2004-03-29 Thread Flemming Greve Skovengaard
MuthuKumar wrote: Hai all. I want to make a script which converts like (pErl1234test = perl).I wrote like #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/;

the standard error

2004-03-29 Thread John
I want to shut the standard error from my scritps. How to do that?

Re: Find User Apache is running as

2004-03-29 Thread JupiterHost.Net
Bob Showalter wrote: JupiterHost.Net wrote: Hello List! I was trying to figure out how to see the user the script/webserver is running as. (Like Apache is 'nobody' or the owner 'foomonkey' perhaps with SuExec enabled) I looked in %ENV and didn't see it in there. Are you trying to find out

Re: Find User Apache is running as

2004-03-29 Thread JupiterHost.Net
WC -Sx- Jones wrote: JupiterHost.Net wrote: problem is foo.pl can be run simultaneously by 2 different users so I'm not sure how I'd be able to make foo.pl tell which ps it belongs to. Not a problem - each will have it's own address space and PID. The issue - and you haven't shown any code

Re: How to determine if STDIN has piped data?

2004-03-29 Thread Smoot Carl-Mitchell
On Mon, 29 Mar 2004 00:38:50 -0700 Bryan Harris [EMAIL PROTECTED] wrote: Alternatively, you can use the '-t' operator: exit 0 if -t STDIN I've been waiting for this for a LONG time, thanks Smoot. No problem. It took me a while to find the correct operator as well. Please keep in

Re: interpolated strings

2004-03-29 Thread John W. Krahn
Wc -Sx- Jones wrote: Bryan Harris wrote: I did this because I want to make sure I end with a \n, but I don't want an extra one if one is already there. I guess I could've also done a: $newtxt =~ s/([^\n])$/$1\n/; This is clearer: $newtext = Hello\n\n\n; $newtext =~ s/\n+/\n/;

Re: string change problem

2004-03-29 Thread WC -Sx- Jones
MuthuKumar wrote: Hai all. I want to make a script which converts like (pErl1234test = perl).I wrote like #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/;

MIME::Lite

2004-03-29 Thread WC -Sx- Jones
yes. Create a multipart message (i.e., one with attachments): ### Create a new multipart message: $msg = MIME::Lite-new( From='[EMAIL PROTECTED]', To ='[EMAIL PROTECTED]', Cc ='[EMAIL

Re: output on stderr from `next'

2004-03-29 Thread Randy W. Sims
Harry Putnam wrote: I'm getting this output on stderr from a next clause: Exiting subroutine via next at ./test_bol.pl line 101. I wondered why this happens. Is it considered an error or what? The script is lengthy so not posting it here but the next does exit a sub routine. That is why I put

Re: string change problem

2004-03-29 Thread Randy W. Sims
MuthuKumar wrote: Hai all. I want to make a script which converts like (pErl1234test = perl).I wrote like #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/;

Re: date math

2004-03-29 Thread Chris Charley
Andrew Gaffney [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] R. Joseph Newton wrote: Andrew Gaffney wrote: [snip] I didn't do it this way because there is a first pay period. If there are only 2 pay periods from the starting date, you can't build a list of 6. My way takes that

more on warn .. is next necessary

2004-03-29 Thread Harry Putnam
I wasn't able to really understand perldoc -f warn. I'm doing use File::Find; open(FILE,$File::Find::name)or warn blah blah: $!; Two things I'm unsure of: 1) is the `: $!' meaningfull here? 2) do I need a `next;' following to make `File::Find' go on to the next found file? If so, how do I let

Re: Incrementing count

2004-03-29 Thread Randy W. Sims
Chance Ervin wrote: - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 29, 2004 6:20 AM Subject: Incrementing count I'm sorry, the previous subject should have been changed. My apologies. while (FILE) { $counter++; } I know this is probably simple,

RE: Incrementing count

2004-03-29 Thread Timothy Donahue
Or this can be further simplified: while (FILE) { $counter += 20; } The += operator is equivilent to saying add the value then assign it to the variable. Tim Donahue -Original Message- From: Chance Ervin [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 1:03 PM To: [EMAIL

RE: Incrementing count

2004-03-29 Thread Bob Showalter
[EMAIL PROTECTED] wrote: I'm sorry, the previous subject should have been changed. My apologies. while (FILE) { $counter++; } I know this is probably simple, but how would I increment by 20? In other words, $counter would increment 1 time for every twenty lines of the file? Any

RE: Find User Apache is running as

2004-03-29 Thread Bob Showalter
JupiterHost.Net wrote: Hello List! I was trying to figure out how to see the user the script/webserver is running as. (Like Apache is 'nobody' or the owner 'foomonkey' perhaps with SuExec enabled) I looked in %ENV and didn't see it in there. Are you trying to find out from a CGI script

Re: string change problem

2004-03-29 Thread John W. Krahn
Muthukumar wrote: Hai all. Hello, I want to make a script which converts like (pErl1234test = perl).I wrote like #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name $name =~ s/\W.*//; #change 1 The \W character class includes every character that is NOT a-z and

`next LABEL' usage

2004-03-29 Thread Harry Putnam
I'm using a next LABEL inside a File::Find sub wanted {...} loop It is further buried in a while loop inside the `sub wanted()' The while loop is while (FILE) on the most recent found file. I want this `next LABEL' to bring on a new file... not a new line in while loop. So using the `next

Re: string change problem

2004-03-29 Thread Smoot Carl-Mitchell
On Mon, 29 Mar 2004 12:14:49 -0600 James Edward Gray II [EMAIL PROTECTED] wrote: On Mar 29, 2004, at 11:02 AM, Smoot Carl-Mitchell wrote: On Mon, 29 Mar 2004 15:05:34 +0530 MuthuKumar [EMAIL PROTECTED] wrote: $name =~ s/\W.*//; #change 1 This RE deletes zero or more

problem with fork wait

2004-03-29 Thread T.S. Ravi Shankar
Hi, At reaching a certain point in my perl program, I need to run a process ( say XYZ ) using SYSTEM command. The result file that this process would produce will be result.process_id. I will have to wait until this result file is produced then proceed extracting certain things from this file.

Re: Incrementing count

2004-03-29 Thread Smoot Carl-Mitchell
On Mon, 29 Mar 2004 12:08:33 -0600 James Edward Gray II [EMAIL PROTECTED] wrote: On Mar 29, 2004, at 8:20 AM, [EMAIL PROTECTED] wrote: I'm sorry, the previous subject should have been changed. My apologies. while (FILE) { $counter++; } I know this is probably simple, but

RE: string change problem

2004-03-29 Thread Charles K. Clarkson
news [EMAIL PROTECTED] wrote: : : I want to make a script which converts like : (pErl1234test = perl).I : wrote like : : #!/usr/bin/perl Always use the following two statements at the beginning of your scripts. They will help catch errors. use strict; use warnings; :

Parsing the hyperlink?

2004-03-29 Thread Ron B
I'm running my own version of bulletinboard and I have a little problem with hyperlinks. I'd like to make them really work. So if posted message includes http://blaablaablaa it would be a hyeprlink when reader opens the message. Messages are stored in .html files so it's quite easy to add a

Re: warn ?!

2004-03-29 Thread Randy W. Sims
James Edward Gray II wrote: Fact: This has nothing to do with ANY variables, it is the way warn() is designed. Trivia: Did you know that $! does NOT contain an error string. It contains the error *number*. The only reason you see a error sting is that it has an overloaded stringification

Makefiles for non-modules

2004-03-29 Thread Kevin Pfeiffer
Hi all, I posted this last night but it appears to have gone lost... Is there an easy way to create a Makefile that will run tests and then install a Perl script not into the Perl module space but simply into /usr local/bin (and possibly then a man page as well)? Everything I look at

Re: the standard error

2004-03-29 Thread Paul Johnson
On Mon, Mar 29, 2004 at 04:08:08PM +0300, John wrote: I want to shut the standard error from my scritps. How to do that? close STDERR; But that's living on the edge. You might consider redirecting STDERR instead, or maybe reopening it to a file somewhere. -- Paul Johnson - [EMAIL

Re: CGI and special characters

2004-03-29 Thread Jenda Krynicky
From: Howard Fuchs [EMAIL PROTECTED] Here is my problem. I have a script which processes input from a textarea which may have 'special characters' in it like ? or ? etc. Unfortunately what I am getting back are these ? or respectively. Looks like UTF8 (Unicode). I believe you will have to

RE: problem with fork wait

2004-03-29 Thread Bob Showalter
T.S. Ravi Shankar wrote: Hi, At reaching a certain point in my perl program, I need to run a process ( say XYZ ) using SYSTEM command. The result file that this process would produce will be result.process_id. I will have to wait until this result file is produced then proceed extracting

RE: `next LABEL' usage

2004-03-29 Thread Charles K. Clarkson
Harry Putnam [EMAIL PROTECTED] wrote: : : I'm using a next LABEL inside a File::Find : sub wanted {...} loop : : It is further buried in a while loop inside the : `sub wanted()' : : The while loop is while (FILE) on the most recent : found file. I want this `next LABEL' to bring on a : new

Createing a email and placing it in Lotus Notes outbox

2004-03-29 Thread Ned Cunningham
Hi all. Can anyone tell me how to place an email in an outbox for Lotus Notes to deliver? I would like to include an attachment if possible. I have googled and not had any luck. Are there any modules for this? Any scripts? Thankx n Ned Cunningham POS Systems Development Monro Muffler Brake

Re: `next LABEL' usage

2004-03-29 Thread Harry Putnam
Charles K. Clarkson [EMAIL PROTECTED] writes: Harry Putnam [EMAIL PROTECTED] wrote: [...] Wants to exit a while loop inside a File::Find \wanted sub routine. Is exiting the while loop sufficient.. or does one need to exit from the current file being offered by `sub find()' : So using the

psync, sym links, and Panther Revisited

2004-03-29 Thread Bill Metzinger
I finally got back to a Jaguar system to verify that this used to work. Symbolic links copied by psync on Panther seem to be copied incorrectly. Psync is never satisfied and wants to copy them on each sync. In Jaguar it worked as expected. Can anyone shed light on this or at least try it on their

Re: string change problem

2004-03-29 Thread Jeff 'japhy' Pinyan
On Mar 29, MuthuKumar said: I want to make a script which converts like (pErl1234test = perl).I #!/usr/bin/perl print Enter ur name $name = STDIN $org_name = $name Those three lines are all missing semicolons. $name =~ s/\W.*//; #change 1

Re: string change problem

2004-03-29 Thread James Edward Gray II
On Mar 29, 2004, at 11:02 AM, Smoot Carl-Mitchell wrote: On Mon, 29 Mar 2004 15:05:34 +0530 MuthuKumar [EMAIL PROTECTED] wrote: $name =~ s/\W.*//; #change 1 This RE deletes zero or more non-alphanumeric characters followed by anything. So it deletes the entire string, since there was

RE: Search for a file pattern in a directory tree recursively

2004-03-29 Thread Rajesh Dorairajan
John, Thanks for the script. I need to filter the result by a specific file extension, how do I that? I tried, ( not exists $files{ $dir } or $files{ $dir }{ mtime } -M _ ) and ( @{ $files{ $dir } }{ qw/name mtime/ } = ( $name, -M _ ) ) and ( /^(full)\w*(\.db)$/ ) It does not

Re: date math

2004-03-29 Thread Andrew Gaffney
Chris Charley wrote: Andrew Gaffney [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] R. Joseph Newton wrote: Andrew Gaffney wrote: [snip] I didn't do it this way because there is a first pay period. If there are only 2 pay periods from the starting date, you can't build a list of 6.

Re: interpolated strings

2004-03-29 Thread John W. Krahn
Bryan Harris wrote: Wow, Johns, thanks for the tips... I'm going to have to study that map command very closely. Either way you've answered my question, thanks! Only one thing to add-- you ask: chomp $newtxt; print $newtxt, \n; Why remove \n in one line and then add it

installing Perl scripts (not modules) to /usr/local/bin (how to do makefile)

2004-03-29 Thread Kevin Pfeiffer
Hi all, Is there an easy way to create a Makefile that will run tests and then install a Perl script not into the Perl module space but simply into /usr local/bin (and possibly then a man page as well)? Everything I look at (including Makefile.PL) seems to be geared to module installation.

Your recommendations to tie multi-level data structures

2004-03-29 Thread Phil Schaechter
All, I would like the ability to tie a database and use it as a multi-level data structure, like $tied{hash}{subhash} $tied{hash}{array}[0] Etc... Any recommendations for this? I've heard I should check out the MLDBM module. How have others conquered this issue? Is it possible? Thanks,

RE: Your recommendations to tie multi-level data structures

2004-03-29 Thread Bob Showalter
Phil Schaechter wrote: All, I would like the ability to tie a database and use it as a multi-level data structure, like $tied{hash}{subhash} $tied{hash}{array}[0] Etc... Any recommendations for this? I've heard I should check out the MLDBM module. How have others conquered this

Re: problem with fork wait

2004-03-29 Thread Smoot Carl-Mitchell
On Mon, 29 Mar 2004 18:38:48 +0530 T.S. Ravi Shankar [EMAIL PROTECTED] wrote: At reaching a certain point in my perl program, I need to run a process( say XYZ ) using SYSTEM command. The result file that this process would produce will be result.process_id. I will have to wait until this

RE: `next LABEL' usage

2004-03-29 Thread Charles K. Clarkson
Harry Putnam [EMAIL PROTECTED] wrote: : : Charles K. Clarkson [EMAIL PROTECTED] writes: : Harry Putnam [EMAIL PROTECTED] wrote: : : [...] : : Wants to exit a while loop inside a File::Find \wanted : sub routine. Is exiting the while loop sufficient.. or : does one need to exit from the

RE: string change problem

2004-03-29 Thread Charles K. Clarkson
WC -Sx- Jones [EMAIL PROTECTED] wrote: : : MuthuKumar wrote: : : I want to make a script which converts : like (pErl1234test = perl). I wrote like : : #! /usr/bin/perl -w : : print Enter ur name; : my $name = STDIN; : my $org_name = $name; : $org_name =~ s/[^a-z]/ /gi; : $org_name

Re: more on warn .. is next necessary

2004-03-29 Thread John W. Krahn
Harry Putnam wrote: I wasn't able to really understand perldoc -f warn. I'm doing use File::Find; open(FILE,$File::Find::name)or warn blah blah: $!; Two things I'm unsure of: 1) is the `: $!' meaningfull here? Yes. 2) do I need a `next;' following to make `File::Find' go on to

Re: string change problem

2004-03-29 Thread WC -Sx- Jones
Charles K. Clarkson wrote: WC -Sx- Jones [EMAIL PROTECTED] wrote: : : MuthuKumar wrote: : print Enter ur name; Sorry, Sx. That produces this: Org = perltest As Entered = pErl1234test The OP wanted: Org = perl As Entered = pErl1234test Sure, but Enter ur name could

hash

2004-03-29 Thread ewalker
any ideas on how I can access say all the values of a hash and not care what the keys are? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: hash

2004-03-29 Thread James Edward Gray II
On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote: any ideas on how I can access say all the values of a hash and not care what the keys are? Sure: foreach (keys %some_hash) { # do something with $_, which will hold one key at a time... } James -- To unsubscribe, e-mail: [EMAIL

RE: hash

2004-03-29 Thread ewalker
-Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 3:06 PM To: ewalker Cc: [EMAIL PROTECTED] Subject: Re: hash On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote: any ideas on how I can access say all the values of a hash and not

RE: hash

2004-03-29 Thread ewalker
-Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 3:06 PM To: ewalker Cc: [EMAIL PROTECTED] Subject: Re: hash On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote: any ideas on how I can access say all the values of a hash and not

RE: hash

2004-03-29 Thread Bob Showalter
[EMAIL PROTECTED] wrote: any ideas on how I can access say all the values of a hash and not care what the keys are? @arr = values %hash; perldoc -f values -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: hash

2004-03-29 Thread James Edward Gray II
On Mar 29, 2004, at 4:09 PM, [EMAIL PROTECTED] wrote: James Hey, That didn't work I didn't explain it right. I have an array of hash pointers. Each hash has like 2 key/value pairs. I want to travers the array and just print out the values from the hashes., Will I need to nest loops here?

RE: hash

2004-03-29 Thread ewalker
-Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 3:18 PM To: ewalker Cc: [EMAIL PROTECTED] Subject: Re: hash On Mar 29, 2004, at 4:09 PM, [EMAIL PROTECTED] wrote: James Hey, That didn't work I didn't explain it right. I have an

File content question

2004-03-29 Thread Sagar, Sanjeev
Hello Everyone, We have a process where several scripts write to centralized log file. I have to retrieve a specific set of information and display in a format. Following is a snippet of log file = Bunch of text lines Variable_name Value 1. 2. 3. 4. . . . Upto 200 lines

Re: Search for a file pattern in a directory tree recursively

2004-03-29 Thread John W. Krahn
Rajesh Dorairajan wrote: From: John W. Krahn [mailto:[EMAIL PROTECTED] This should do what you want: use strict; use warnings; use File::Find; use vars qw( $dir $name ); *dir = *File::Find::dir; *name = *File::Find::name; my $localdir = 'C:/docs'; my %files; find(

Re: File content question

2004-03-29 Thread Morbus Iff
Where are you getting lost? I don't recall your previous messages, so I'm not sure what like before means... Anyway, here's an untested rewrite. Untested. Mmhm. The biggest problem is making sure to reset %datastore when you come across another bunch of text lines that don't match your variable

Re: File content question

2004-03-29 Thread John W. Krahn
Sanjeev Sagar wrote: Hello Everyone, Hello, We have a process where several scripts write to centralized log file. I have to retrieve a specific set of information and display in a format. Following is a snippet of log file = Bunch of text lines Variable_name

RE: File content question

2004-03-29 Thread Sagar, Sanjeev
Big Thanks ! My log file looks like below 2004-03-26 @ 00:00:01 [EMAIL PROTECTED] -- 10881 10864 hyb01 :INFORMATIONAL 2004-03-26 @ 00:00:01 [EMAIL PROTECTED] -- 10881 10864 hyb01 Function (up) returned (0) return code. -- seconds -- 1:INFORMATIONAL 2004-03-26 @ 00:00:01 [EMAIL PROTECTED] --

Re: hash

2004-03-29 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 3:06 PM To: ewalker Cc: [EMAIL PROTECTED] Subject: Re: hash On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote: any ideas on how I can access say all the values

Re: How to determine if STDIN has piped data?

2004-03-29 Thread Keith P. Boruff
Bryan Harris wrote: Alternatively, you can use the '-t' operator: exit 0 if -t STDIN I've been waiting for this for a LONG time, thanks Smoot. - B Excellent! Worked like a charm! This is exactly the kind of thing I was looking for. Thanks! Keith P. Boruff -- To unsubscribe,

Re: Parsing the hyperlink?

2004-03-29 Thread Wiggins d'Anconia
Ron B wrote: I'm running my own version of bulletinboard and I have a little problem with hyperlinks. I'd like to make them really work. So if posted message includes http://blaablaablaa it would be a hyeprlink when reader opens the message. Messages are stored in .html files so it's quite easy

Re: more on warn .. is next necessary

2004-03-29 Thread Harry Putnam
John W. Krahn [EMAIL PROTECTED] writes: If so, how do I let the `next' know that open has failed? That is, how do I test exit status of open function? open() returns true on success and undef (false) when it fails. Is it just as in shell programing ($?)? No. ok, then how is it done

Re: `next LABEL' usage

2004-03-29 Thread Harry Putnam
Charles K. Clarkson [EMAIL PROTECTED] writes: HTH, Definitely and thanks for the examples. I think I was making this more complicated that it needed to be. It's slowly sinking in what all a `return' can do. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: more on warn .. is next necessary

2004-03-29 Thread Wiggins d'Anconia
Harry Putnam wrote: John W. Krahn [EMAIL PROTECTED] writes: If so, how do I let the `next' know that open has failed? That is, how do I test exit status of open function? open() returns true on success and undef (false) when it fails. Is it just as in shell programing ($?)? No. ok, then how

Re: more on warn .. is next necessary

2004-03-29 Thread Harry Putnam
Wiggins d'Anconia [EMAIL PROTECTED] writes: [...] if you don't mind dieing, or I often prefer using 'unless' then I don't need to worry about a dangling else, so similar to what you have above, In this case I do. unless (open(FILE, $file)) { warn Failed open: $!; return; } Ah

Re: Incrementing count

2004-03-29 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: I'm sorry, the previous subject should have been changed. My apologies. while (FILE) { $counter++; } I know this is probably simple, but how would I increment by 20? In other words, $counter would increment 1 time for every twenty lines of the file? Any help

Re: Incrementing count

2004-03-29 Thread R. Joseph Newton
Smoot Carl-Mitchell wrote: This is not what the poster asked. Actually, yes it is, at least part of it. He said would I increment by 20?... $counter would increment 1 time for every twenty lines of the file? This will increment the counter by 20 for every line of the file. Read without

Re: `next LABEL' usage

2004-03-29 Thread R. Joseph Newton
Harry Putnam wrote: Charles K. Clarkson [EMAIL PROTECTED] writes: HTH, Definitely and thanks for the examples. I think I was making this more complicated that it needed to be. It's slowly sinking in what all a `return' can do. Hi Harry, Glad Charles got you squared away. I have to

Re: psync, sym links, and Panther Revisited

2004-03-29 Thread WC -Sx- Jones
Bill Metzinger wrote: I finally got back to a Jaguar system to verify that this used to work. ... On Jaguar systems, running psync twice says there are zero items to copy. Thank you for your help. If you *are* backing-up your system - please see this first and avoid data loss. I mean Perl is

Re: File content question

2004-03-29 Thread R. Joseph Newton
Sagar, Sanjeev wrote: Big Thanks ! My log file looks like below Would be better with multiple sections, and only a few representative line per... 2004-03-26 @ 00:00:01 [EMAIL PROTECTED] -- 10881 10864 hyb01 :INFORMATIONAL ... Script/function sql_instance_ping_final started at Fri Mar

What is happening here

2004-03-29 Thread WC -Sx- Jones
What is happening here - #! /usr/bin/perl use strict; use warnings; my $count; while(1) { (++$count) ? $count += $count-- : $count += $count++; print $count\n; exit if $count 60_000; sleep 1; } __END__ -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Incrementing count

2004-03-29 Thread R. Joseph Newton
Smoot Carl-Mitchell wrote: Hi Carl-Mitchell, Please stay on the list. I will address that. I'll take this offline, since I do not think it should be on the list I disagree. With all due respect, you and I have not developed a personal correspondence. There are some very good reasons for

RE: What is happening here

2004-03-29 Thread Tim Johnson
Apparently (++$count) evaluates to 0, but I can't figure out why. So the second expression is evaluated first. From there it's pretty self-explanatory. (++$count) will always evaluate to TRUE, since it will only get higher, and the first expression is evaluated. Maybe someone can enlighten

  1   2   >