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 = $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/; #change 2 print "O

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 = > $org_name = $n

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 () { $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 () { $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 () { >$counter++; > } > > I know this is probably simple, but

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 = $org_name = $name You are missing semi-colons on all three lin

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 () { $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 t

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 = $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/; #change 2

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 fr

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

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"; > $ne

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 = $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/; #change 2

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 PROTEC

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 = $org_name = $name $name =~ s/\W.*//; #change 1 $name =~ tr/A-Z/a-z/; #change 2

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 t

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

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 () { $counter++; } I know this is probably simple,

RE: Incrementing count

2004-03-29 Thread Timothy Donahue
Or this can be further simplified: while () { $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 () { >$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 fil

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 sc

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 = > $org_name = $name > $name =~ s/\W.*//; #change 1 The \W character class includes every character that is NOT a-

`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 () 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 LABEL' t

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 del

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.. I will have to wait until this result file is produced & then proceed extracting certain things from this file. I am imp

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 () { > >$counter++; > > } > > > > I know this is pro

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 http:

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 oper

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 > (incl

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 PROTE

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

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.. I will have to > wait until this result file is produced & then proceed extracting > c

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 () on the most recent : found file. I want this `next LABEL' to bring on a : new file..

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 2

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

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 s

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 = >$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

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 s

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

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

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. -Kevin

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, P

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 conque

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.. I will have to > wait until this resul

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 t

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 = ; : 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::Fi

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"

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]

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 PROTE

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]

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? Probabl

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 a

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 = Variable_name Value 1. 2. 3. 4. . . . Upto 200 lines of variables and the

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'; >

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 that don't match your variable names. You didn't pr

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 > > = > > > Variable_name Value > 1

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] -- 10878

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, e

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 h

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: [E

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

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: $!"; >re

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 () { >$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: 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

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 gre

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 F

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: [E

Re: What is happening here

2004-03-29 Thread Andrew Gaffney
WC -Sx- Jones wrote: 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- That is a damn good question. I'm not sure what results I w

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 th

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

Re: What is happening here

2004-03-29 Thread R. Joseph Newton
Andrew Gaffney wrote: > WC -Sx- Jones wrote: > > 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;

Re: What is happening here

2004-03-29 Thread R. Joseph Newton
"R. Joseph Newton" wrote: > Andrew Gaffney wrote: > > > WC -Sx- Jones wrote: > > > What is happening here - > > That is a damn good question. I'm not sure what results I was expecting when I ran > > it, but > > it sure wasn't this: > > > > 3 > > 15 > > 63 > > 255 > I'm stumped, also.I would have

Re: What is happening here

2004-03-29 Thread R. Joseph Newton
Tim Johnson wrote: > Apparently (++$count) evaluates to 0, but I can't figure out why. Nope. Always true. It just doesn'yt matter. Bill sorta threw us a red herring here. Seeing the conditiional operator distracts your attention to thinking about the product of the conditional, which is not