Unsticky fields with CGI?

2005-03-11 Thread Jan Eden
Hi, how can I turn off stickiness for CGI's HTML methods. Example: I call a script with parameter mode=new and the following line print $q-hidden('mode', 'slurp'); prints out input type=hidden name=mode value=new / instead of input type=hidden name=mode value=slurp / I tried the

Re: Unsticky fields with CGI? (Sorry)

2005-03-11 Thread Jan Eden
Hi, should have read perldoc *thoroughly*, sorry: Note, that just like all the other form elements, the value of a hidden field is sticky. If you want to replace a hidden field with some other values after the script has been called once you'll have to do it manually:

Re: Unsticky fields with CGI? (Sorry)

2005-03-11 Thread Randal L. Schwartz
Jan == Jan Eden [EMAIL PROTECTED] writes: Jan Hi, Jan should have read perldoc *thoroughly*, sorry: Note, that just like all the other form elements, the value of a hidden field is sticky. If you want to replace a hidden field with some other values after the script has been called once

How to figure out Size of Var.

2005-03-11 Thread Bastian Angerstein
How can I figure out how many chars are stored in a variable? Or how can I determit the length of a string in a variable? this methode is a little poor: @array = split //, $var; $size = scalar (@array); Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: How to figure out Size of Var.

2005-03-11 Thread Manav Mathur
See perldoc -f length Manav -Original Message- From: Bastian Angerstein [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 1:36 PM To: beginners@perl.org Subject: How to figure out Size of Var. How can I figure out how many chars are stored in a variable? Or how can I determit

Re: Best way to check if element exists

2005-03-11 Thread Ramprasad A Padmanabhan
print exists if $hash{key}; Obviously. But If I am just checking key exists , Is it worth having a DB_File Hash Thanks Ram -- Netcore Solutions Pvt. Ltd. Website: http://www.netcore.co.in Spamtraps:

Re: Simplify perl -e '$a = [1,2,3,4,7]; print $a-[$#{@$a}]'

2005-03-11 Thread Gerhard Meier
On Thu, Mar 10, 2005 at 11:10:06AM -0500, Wiggins d'Anconia wrote: Btw ... What perldoc can I read to read about '$#'? Not sure, a quick glance at perldata discusses the -1 index usage, but didn't turn up $# that I could see. Its in the books :-). wiggim$ perldoc perldata | fgrep -c '$#'

A question about backreference

2005-03-11 Thread Zeng Nan
Hi, Suppose there is a string var = 123, I want to substitute 123 by 456, then I have to write like this s/(var\s+=)\s+\d+/\1 123/. Is there a way so that I can combine ' ' into the parenthesis as s/(var\s+=\s+)\d+/\1456? I know \1456 is not correct, but how can I seperate \1 and 456 without

Re: regular expression help

2005-03-11 Thread Ing. Branislav Gerzo
Stone [S], on Thursday, March 10, 2005 at 16:46 (-0800) typed: S That won't work either. When you say ([1-9]\d?) you're telling it S (If there is a match) capture the stuff in parentheses and store it. S When you say \1 you're telling the script you know that first S batch of stuff you

Re: A question about backreference

2005-03-11 Thread John Doe
Am Freitag, 11. März 2005 07.21 schrieb Zeng Nan: Hi, Suppose there is a string var = 123, I want to substitute 123 by 456, then I have to write like this s/(var\s+=)\s+\d+/\1 123/. Is there a way so that I can combine ' ' into the parenthesis as s/(var\s+=\s+)\d+/\1456? I know \1456 is not

Re: A question about backreference

2005-03-11 Thread Stone
Suppose there is a string var = 123, I want to substitute 123 by 456, then I have to write like this s/(var\s+=)\s+\d+/\1 123/. Is there a way so that I can combine ' ' into the parenthesis as s/(var\s+=\s+)\d+/\1456? I know \1456 is not correct, but how can I seperate \1 and 456 without

Re: regular expression help

2005-03-11 Thread Stone
I hope I don't have any bugs here :) Just one. :) Your expressions all say \d instead of \d? for the second digit in each set, while the simple one correctly has \d?. So your expressions had an unfair advantage and as a result finish faster. Add \d? to your expressions, and you should find

Re: A question about backreference

2005-03-11 Thread Zeng Nan
On Fri, Mar 11, 2005 at 01:10:59AM -0800, Stone wrote: Is there any chance you'll ever have var=123? Your expression currently requires the spaces. As far as I can tell, all you're doing is replacing the numbers on the right hand side of the string. So, how about using this instead:

writing to CSV file

2005-03-11 Thread SG Edwards
Hi, I have a program that extracts variables from a list of flatfiles and I want to insert these variables into a PostreSQL database. I was planning on creating a CSV file with a line allocated for each file which can then be inserted into the database using the COPY command. Is the best way

RE: writing to CSV file

2005-03-11 Thread Thomas Bätzler
SG Edwards [EMAIL PROTECTED] asked: I have a program that extracts variables from a list of flatfiles and I want to insert these variables into a PostreSQL database. I was planning on creating a CSV file with a line allocated for each file which can then be inserted into the database

Re: regular expression help

2005-03-11 Thread Ing. Branislav Gerzo
Stone [S], on Friday, March 11, 2005 at 01:52 (-0800) made these points: S Just one. :) S Your expressions all say \d instead of \d? for the second digit in S each set, while the simple one correctly has \d?. So your S expressions had an unfair advantage and as a result finish faster. right,

Re: Dead-module etiquette

2005-03-11 Thread Jeff Eggen
Jeff 'japhy' Pinyan [EMAIL PROTECTED] 10/03/2005 11:03:57 am You can release a module in the same hierarchy. Time::Period::Extended, for example. Would this mean that I make a new file, Time/Period/Extended.pm, package Time::Period::Extended, which just does a use Time::Period and then lists

re: searching and replacing

2005-03-11 Thread FlashMX
Hi, I need to modify some existing code. The below line checks a file I'm reading in and does a search/replace based on the match. Currently I'm looking for... if (/0 set/) { ...etc. Because the 00 can change to different numbers (but always 6 figures which could include a period)

Re: searching and replacing

2005-03-11 Thread Wiggins d'Anconia
FlashMX wrote: Hi, I need to modify some existing code. The below line checks a file I'm reading in and does a search/replace based on the match. Currently I'm looking for... if (/0 set/) { ...etc. Because the 00 can change to different numbers (but always 6 figures which could include a

Re: searching and replacing

2005-03-11 Thread FlashMX
Cool...that worked...thanks I forgot to mention that one the match is found I do a search and replace if (/[0-9.]{6} setgray/) { s/.9 set/-50.2 v \n.9 set/; This is the issue. I need to grab the match number (whatever it is) and add it into the s/

Re: searching and replacing

2005-03-11 Thread Wiggins d'Anconia
Because it's up-side down. Why is that? It makes replies harder to read. Why not? Please don't top-post. (Sherm Pendley, MacOSX List) FlashMX wrote: Cool...that worked...thanks I forgot to mention that one the match is found I do a search and replace if (/[0-9.]{6} setgray/) {

Executing perl code on the command line

2005-03-11 Thread renard
I am running ActivePerl 5.8.6 on Windows XP. I am unable to execute a statement like -- perl -e 'perl code' -- I always get this response: Can't find string terminator ' anywhere before EOF at -e line 1. Does not matter if I use (', , or `) .. same response expect it can't find the string

Re: Executing perl code on the command line

2005-03-11 Thread Alfred Vahau
Like: perl -e print \Hello World!\n\; alfred, renard wrote: I am running ActivePerl 5.8.6 on Windows XP. I am unable to execute a statement like -- perl -e 'perl code' -- I always get this response: Can't find string terminator ' anywhere before EOF at -e line 1. Does not matter if I use (', ,

Re: searching and replacing

2005-03-11 Thread John W. Krahn
FlashMX wrote: Hi, Hello, I need to modify some existing code. The below line checks a file I'm reading in and does a search/replace based on the match. Currently I'm looking for... if (/0 set/) { ...etc. Because the 00 can change to different numbers (but always 6 figures which could

RE: Executing perl code on the command line

2005-03-11 Thread Bakken, Luke
I am unable to execute a statement like -- perl -e 'perl code' -- I always get this response: Can't find string terminator ' anywhere before EOF at -e line 1. From the command line, use to quote your code and qq() or q() as quotes inside your code: c:\perl -eprint qq(Hello\n) -- To

Re: searching and replacing

2005-03-11 Thread John W. Krahn
John W. Krahn wrote: FlashMX wrote: I need to modify some existing code. The below line checks a file I'm reading in and does a search/replace based on the match. Currently I'm looking for... if (/0 set/) { ...etc. Because the 00 can change to different numbers (but always 6 figures which

Re: searching and replacing

2005-03-11 Thread FlashMX
FlashMX wrote: Cool...that worked...thanks I forgot to mention that one the match is found I do a search and replace if (/[0-9.]{6} setgray/) { s/.9 set/-50.2 v \n.9 set/; This is the issue. I need to grab the match number (whatever it is) and

Re: searching and replacing

2005-03-11 Thread FlashMX
On Fri, 11 Mar 2005 07:53:30 -0800, John W. Krahn wrote: John W. Krahn wrote: FlashMX wrote: I need to modify some existing code. The below line checks a file I'm reading in and does a search/replace based on the match. Currently I'm looking for... if (/0 set/) { ...etc. Because the

Re: searching and replacing

2005-03-11 Thread John W. Krahn
FlashMX wrote: Cool...that worked...thanks I forgot to mention that one the match is found I do a search and replace if (/[0-9.]{6} setgray/) { s/.9 set/-50.2 v \n.9 set/; This is the issue. I need to grab the match number (whatever it is) and add it into

Re: searching and replacing

2005-03-11 Thread FlashMX
On Fri, 11 Mar 2005 10:57:19 -0500, FlashMX wrote: On Fri, 11 Mar 2005 07:53:30 -0800, John W. Krahn wrote: John W. Krahn wrote: FlashMX wrote: I need to modify some existing code. The below line checks a file I'm reading in and does a search/replace based on the match. Currently I'm

Re: searching and replacing

2005-03-11 Thread FlashMX
Why does this syntax not work? The $1 does not come out. if (/([0-9.]{6}) set/) { s/$1 set/\n-50.2 v \n$1 set/; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: searching and replacing

2005-03-11 Thread Stone
if (/([0-9.]{6}) set/) { s/$1 set/\n-50.2 v \n$1 set/; You need to escape the period or it will match any character but newline. As it is right now you'll match .FANTA, which isn't what you want. Why does this syntax not work? The $1 does not come out. You

pack-unicode problem (z/OS)

2005-03-11 Thread Rajarshi Das
Hi, I am running perl 5.8.6 on z/OS unix. I am doing these : $u = unpackU0U, \x8a\x73; print \n\$u : $u; $p = pack(U0U, $u); print \n\$p : $p; This intuitively suggests that $p should be set to the chars \x8a and \x73. But that isnt the case. Instead I get the char \x59. Alternately, If I

Re: searching and replacing

2005-03-11 Thread John W. Krahn
Stone wrote: if (/([0-9.]{6}) set/) { s/$1 set/\n-50.2 v \n$1 set/; You need to escape the period or it will match any character but newline. As it is right now you'll match .FANTA, which isn't what you want. A character class is not the same as a regular

Re: Executing perl code on the command line

2005-03-11 Thread perlmails
- Original Message - From: renard [EMAIL PROTECTED] To: Perl Beginners List beginners@perl.org Sent: Friday, March 11, 2005 9:23 AM Subject: Executing perl code on the command line I am running ActivePerl 5.8.6 on Windows XP. I am unable to execute a statement like -- perl -e 'perl

regexp help

2005-03-11 Thread radhika
Hi, I need to parse this string: 2005-03-11 13:49:41.19 to just get the hour and minute. my program has: if( $string = /([\d]+)-([\d]+)-([\d]+)\s([\d\d):(\d\d):(\w+)/ ) { print(Hour:Minute = $4:$5\n); } This is breaking. If anyone can refine this, that would be great. thanks, radhika --

Re: regexp help

2005-03-11 Thread Ankur Gupta
radhika wrote: Hi, I need to parse this string: 2005-03-11 13:49:41.19 to just get the hour and minute. my program has: if( $string = /([\d]+)-([\d]+)-([\d]+)\s([\d\d):(\d\d):(\w+)/ ) I guess it should have been =~ instead of = { print(Hour:Minute = $4:$5\n); } if ( $string =~

RE: regexp help

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
radhika wrote: Hi, I need to parse this string: 2005-03-11 13:49:41.19 to just get the hour and minute. my program has: if( $string = /([\d]+)-([\d]+)-([\d]+)\s([\d\d):(\d\d):(\w+)/ ) { print(Hour:Minute = $4:$5\n); } I doubt that you are running under strict and warnings.

Re: regexp help

2005-03-11 Thread Stone
if( $string = /([\d]+)-([\d]+)-([\d]+)\s([\d\d):(\d\d):(\w+)/ ) { print(Hour:Minute = $4:$5\n); } You have an unmatched [ in your expression. (\w+) doesn't match the . if that matters to you. This is breaking. If anyone can refine this, that would be great. thanks, radhika --

Re: pack-unicode problem (z/OS)

2005-03-11 Thread Dave Gray
I am running perl 5.8.6 on z/OS unix. I am doing these : $u = unpackU0U, \x8a\x73; print \n\$u : $u; $p = pack(U0U, $u); print \n\$p : $p; Are you running with strict and warnings turned on? Because I'm getting Malformed UTF-8 character messages running this: #!/usr/bin/perl use

Multiple variable initialization

2005-03-11 Thread Peter Rabbitson
Is there a quick way to initialize a number of variables at once? Something like my ($var1, $var2, $var3); but instead of having undef in all of them, let's say I want to have 1 in each. Any takers? Peter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Multiple variable initialization

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Peter Rabbitson wrote: Is there a quick way to initialize a number of variables at once? Something like my ($var1, $var2, $var3); my ($var1, $var2, $var3) = ( 1,1,1 ); Wags ;) but instead of having undef in all of them, let's say I want to have 1 in each. Any takers? Peter

Re: Multiple variable initialization

2005-03-11 Thread Chris Devers
On Fri, 11 Mar 2005, Peter Rabbitson wrote: Is there a quick way to initialize a number of variables at once? Something like my ($var1, $var2, $var3); but instead of having undef in all of them, let's say I want to have 1 in each. Any takers? Yes. my ($var1, $var2, $var3) = (1,

Re: Multiple variable initialization

2005-03-11 Thread Peter Rabbitson
On Fri, Mar 11, 2005 at 12:45:10PM -0800, Wagner, David --- Senior Programmer Analyst --- WGO wrote: Peter Rabbitson wrote: Is there a quick way to initialize a number of variables at once? Something like my ($var1, $var2, $var3); my ($var1, $var2, $var3) = ( 1,1,1 ); Wags ;)

Re: writing to CSV file

2005-03-11 Thread Marco Antonio Manzo
On Fri, 2005-03-11 at 10:25 +, SG Edwards wrote: Hi, I have a program that extracts variables from a list of flatfiles and I want to insert these variables into a PostreSQL database. I was planning on creating a CSV file with a line allocated for each file which can then be

Re: Multiple variable initialization

2005-03-11 Thread Todd W
Peter Rabbitson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, Mar 11, 2005 at 12:45:10PM -0800, Wagner, David --- Senior Programmer Analyst --- WGO wrote: Peter Rabbitson wrote: Is there a quick way to initialize a number of variables at once? Something like my

print with +split

2005-03-11 Thread DBSMITH
All, Here is my code: use strict; use warnings; my $dev = qw/original1/; my $dev1 = qw/clinical1/; my $fout = qq(/usr/local/log/fuji.out); open (OUT, +$fout) || die unable to open file: $fout $!; open (FOO, samcmd a $dev 2\1 | ) || die unable to open pipe... $!; while

Re: Multiple variable initialization

2005-03-11 Thread Todd W
Todd W [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Peter Rabbitson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, Mar 11, 2005 at 12:45:10PM -0800, Wagner, David --- Senior Programmer Analyst --- WGO wrote: Peter Rabbitson wrote: Is there a quick way

Re: Multiple variable initialization

2005-03-11 Thread Peter Rabbitson
On Fri, Mar 11, 2005 at 04:09:12PM -0500, Todd W wrote: Peter Rabbitson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, Mar 11, 2005 at 12:45:10PM -0800, Wagner, David --- Senior Programmer Analyst --- WGO wrote: Peter Rabbitson wrote: Is there a quick way to

RE: print with +split

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: All, Here is my code: use strict; use warnings; my $dev = qw/original1/; my $dev1 = qw/clinical1/; my $fout = qq(/usr/local/log/fuji.out); open (OUT, +$fout) || die unable to open file: $fout $!; open (FOO, samcmd a $dev 2\1 | ) || die unable

RE: print with +split

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: All, Here is my code: use strict; use warnings; my $dev = qw/original1/; my $dev1 = qw/clinical1/; my $fout = qq(/usr/local/log/fuji.out); open (OUT, +$fout) || die unable to open file: $fout $!; open (FOO, samcmd a $dev 2\1 | ) || die unable

RE: print with +split

2005-03-11 Thread DBSMITH
Wags, come on you did not answer all my questions??? What about I took away the + from the print and I had some errors, why is the + infront of the split needed in Perl? I looked in my programming perl and could not find it/. The reason I want to use split is b/c these numbers change

Re: regexp help

2005-03-11 Thread John W. Krahn
radhika wrote: Hi, Hello, I need to parse this string: 2005-03-11 13:49:41.19 to just get the hour and minute. my program has: if( $string = /([\d]+)-([\d]+)-([\d]+)\s([\d\d):(\d\d):(\w+)/ ) { print(Hour:Minute = $4:$5\n); } This is breaking. If anyone can refine this, that would be great.

RE: print with +split

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: Wags, come on you did not answer all my questions??? What about I answered what I could. So is this what you want: 62622 62622 62535 87 where the code looks like: #!perl use strict; use warnings; my $diff=0; my $MyMult = 1; my $MyId; while (DATA) {

Why am I getting data from Current Directory?

2005-03-11 Thread Bret Goodfellow
I am writing a script to list out a directory's contents, showing the number of days since modified. The problem I am having is that the script doesn't list out the modified time unless I change to the directory being listed. If I change to the directory I want to list, then all works okay. Is

RE: Why am I getting data from Current Directory?

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Bret Goodfellow wrote: I am writing a script to list out a directory's contents, showing the number of days since modified. The problem I am having is that the script doesn't list out the modified time unless I change to the directory being listed. If I change to the directory I want to

RE: print with +split

2005-03-11 Thread DBSMITH
Yes Wags the end result is 87, but I want to just take these two numbers and subtract then as opposed to using the * operator . I appreciate you efforts, but there's got to be an easier and more closely related answer to my original code with +(split)[2]. Does anyone know the answer

Re: Multiple variable initialization

2005-03-11 Thread Alfred Vahau
my ($var1, $var2, $var3... arbitrary number of vars) = 1, which obviously doesn't work, but I hoped it's only due to my lack of syntax knowledge. my $var1 = my $var2 = my $var3 = 1; works. Still ugly? alfred Peter Rabbitson wrote: On Fri, Mar 11, 2005 at 04:09:12PM -0500, Todd W wrote: Peter

Re: Why am I getting data from Current Directory?

2005-03-11 Thread John W. Krahn
Bret Goodfellow wrote: I am writing a script to list out a directory's contents, showing the number of days since modified. The problem I am having is that the script doesn't list out the modified time unless I change to the directory being listed. If I change to the directory I want to list,

Re: print with +split

2005-03-11 Thread John W. Krahn
[ Please TRIM your posts! ] [EMAIL PROTECTED] wrote: Does anyone know the answer to: I took away the + from the print and I had some errors, why is the + infront of the split needed in Perl? I looked in my programming perl and could not find it. perldoc -f print John -- use Perl;

Re: print with +split

2005-03-11 Thread DBSMITH
ok in perldoc print it states: If FILEHANDLE is a variable and the next token is a term, it may me intrepreted as an operator unless you interpose a + . so in the code : while (FOO) { code ...code print +(split)[2], $, ; } FOO is my filehandle and it is considered a

RE: Why am I getting data from Current Directory?

2005-03-11 Thread Bret Goodfellow
The File::Find::name didn't seem to make any difference. I still have to be in the directory that I want to search. Hmmm. -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 3:13 PM To: Bret Goodfellow;

Re: print with +split

2005-03-11 Thread John W. Krahn
[EMAIL PROTECTED] wrote: All, Hello, Here is my code: use strict; use warnings; my $dev = qw/original1/; my $dev1 = qw/clinical1/; Why are you creating a list and then assigning it to a scalar? my $fout = qq(/usr/local/log/fuji.out); Why use double quotes on a string that has nothing to

RE: Why am I getting data from Current Directory?

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Bret Goodfellow wrote: The File::Find::name didn't seem to make any difference. I still have to be in the directory that I want to search. Hmmm. -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 3:13

Re: print with +split

2005-03-11 Thread John W. Krahn
[EMAIL PROTECTED] wrote: John W. Krahn [ Please TRIM your posts! ] [EMAIL PROTECTED] wrote: Does anyone know the answer to: I took away the + from the print and I had some errors, why is the + infront of the split needed in Perl? I looked

Re: Why am I getting data from Current Directory?

2005-03-11 Thread John W. Krahn
Wagner, David --- Senior Programmer Analyst --- WGO wrote: Bret Goodfellow wrote: From: Wagner, David --- Senior Programmer Analyst --- WGO Bret Goodfellow wrote: I am writing a script to list out a directory's contents, showing the number of days since modified. The problem I am having is that

RE: Why am I getting data from Current Directory?

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
John W. Krahn wrote: Wagner, David --- Senior Programmer Analyst --- WGO wrote: Bret Goodfellow wrote: From: Wagner, David --- Senior Programmer Analyst --- WGO Bret Goodfellow wrote: I am writing a script to list out a directory's contents, showing the number of days since modified.

lost in multidimension

2005-03-11 Thread Peter Rabbitson
I've been writing a failry complicated data collector with structures as deep as 7 levels, and everything worked very nice for me, until I started cleaning the subroutine interfaces, so they would pass references back and forth instead of working on global vars. The following is a sample code:

RE: lost in multidimension

2005-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Peter Rabbitson wrote: I've been writing a failry complicated data collector with structures as deep as 7 levels, and everything worked very nice for me, until I started cleaning the subroutine interfaces, so they would pass references back and forth instead of working on global vars. The

Re: lost in multidimension

2005-03-11 Thread Peter Rabbitson
On Fri, Mar 11, 2005 at 04:42:14PM -0800, Wagner, David --- Senior Programmer Analyst --- WGO wrote: Peter Rabbitson wrote: I've been writing a failry complicated data collector with structures as deep as 7 levels, and everything worked very nice for me, until I started cleaning the

Re: print with +split

2005-03-11 Thread Randal L. Schwartz
David == David [EMAIL PROTECTED] writes: David /\s(\d+)/, David $diff += $1 * $MyMult; Never never never NEVER NEVER use $1 without testing whether the match worked or not. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Re: Multiple variable initialization

2005-03-11 Thread Randal L. Schwartz
Peter == Peter Rabbitson [EMAIL PROTECTED] writes: Peter Is there a quick way to initialize a number of variables at once? Something Peter like Peter my ($var1, $var2, $var3); Peter but instead of having undef in all of them, let's say I want to have 1 in Peter each. Any takers? First, I

Re: print with +split

2005-03-11 Thread DBSMITH
ok perl people... I chnaged my code from use strict; use warnings; my $dev = qw/original1/; my $dev1 = qw/clinical1/; my $fout = qq(/usr/local/log/fuji.out); open (OUT, +$fout) || die unable to open file: $fout $!; open (FOO, samcmd a $dev 2\1 | ) || die unable to open