Re: assign STDIN to a hash ref

2006-10-25 Thread John W. Krahn
Brian Volk wrote: > Hello~ > > I'm trying to assign STDIN to a hash ref... I think? :-) perldoc -q "pass.*filehandle" John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscrib

Re: Is that I can do something like that ?

2006-10-25 Thread John W. Krahn
Bryan R Harris wrote: > >>>2) perl -le '$x = qw/a b c d e/; print $x' >>>e >>>Or better what is (2) doing? >>Read up on the comma operator in perlop (and I know there are no literal >>commas in (2) but qw/a b c d e/ behaves exactly the same as ('a', 'b', 'c', >>'d', 'e').) >> >>perldoc perlop > >

Re: assign STDIN to a hash ref

2006-10-25 Thread Arnaldo Guzman
Arnaldo Guzman wrote: Brian Volk wrote: Hello~ I'm trying to assign STDIN to a hash ref... I think? :-) I have a working program (w/o references) but I think it will easily get out of control if I don't learn to use references. Here is what I would like to do: User selects vendor and then

Re: assign STDIN to a hash ref

2006-10-25 Thread Arnaldo Guzman
Brian Volk wrote: Hello~ I'm trying to assign STDIN to a hash ref... I think? :-) I have a working program (w/o references) but I think it will easily get out of control if I don't learn to use references. Here is what I would like to do: User selects vendor and then selects the type of ima

Re: Retrieving and Parsing Particular Data From a Website

2006-10-25 Thread Tom Phoenix
On 10/25/06, Danny Favela <[EMAIL PROTECTED]> wrote: I'm trying to get particular data from a website. The data is in a table. I am to: 1. Parse the source code and locate the string indicating that the data related to that item will soon follow. 2. Retrieve that data. The data changes ever

Re: Is that I can do something like that ?

2006-10-25 Thread Bryan R Harris
>> 2) perl -le '$x = qw/a b c d e/; print $x' >> e > >> Or better what is (2) doing? > > Read up on the comma operator in perlop (and I know there are no literal > commas in (2) but qw/a b c d e/ behaves exactly the same as ('a', 'b', 'c', > 'd', 'e').) > > perldoc perlop Why would this be c

assign STDIN to a hash ref

2006-10-25 Thread Brian Volk
Hello~ I'm trying to assign STDIN to a hash ref... I think? :-) I have a working program (w/o references) but I think it will easily get out of control if I don't learn to use references. Here is what I would like to do: User selects vendor and then selects the type of image (regular or thumbn

Retrieving and Parsing Particular Data From a Website

2006-10-25 Thread Danny Favela
Ishnu'alah. I'm trying to get particular data from a website. The data is in a table. I am to: 1. Parse the source code and locate the string indicating that the data related to that item will soon follow. 2. Retrieve that data. The data changes every day, so it's not an issue of simply look

Re: Find all matches in a string via regex

2006-10-25 Thread D. Bolliger
C.R. am Mittwoch, 25. Oktober 2006 20:38: > Well, that kinda worked. I had to change it to work on a scalar so this > is what I wrote: > $s=~s/(\d+ +cm)/$1/g; > > Input string: 144 cm > Output string: 144 cm > > Why did I get duplicate and strings? Hm, I can't reproduce this (perl 5.8.8): $ per

Re: [OT] Spam from this list

2006-10-25 Thread Dr.Ruud
"Ron Goral" schreef: > Is anyone else receiving spam from this list? I wouldn't know, I don't see much spam at all; every day a lot of messages addressed to me never even get through the gate. I am using effectively two e-mail addresses openly for over 12 years now: [EMAIL PROTECTED] [EMAIL PROTE

Re: Is that I can do something like that ?

2006-10-25 Thread Dr.Ruud
Bryan R Harris schreef: > [attribution repaired] John W. Krahn >> $ perl -le' $x = qw/ a b c d e /; print $x' >> e > > Why? That doesn't make sense to me. Do your tries with perl -MO=Deparse -wle '...' and you'll see. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail:

Re: Find all matches in a string via regex

2006-10-25 Thread Dr.Ruud
"D. Bolliger" schreef: > #!/usr/bin/perl > use strict; > use warnings; > > while () { > s/(\d+\s+cm)/$1/g; > print; > } > > __DATA__ > 54 x 34 x 30-3/4 H137 x 86 x 78 cmKneehole Height: 24-1/2`` (62 > cm)Chair height: 30-3/4 (78 cm) If "cm" can be wrapped to the next line, either slurp or use

Re: Is that I can do something like that ?

2006-10-25 Thread John W. Krahn
Bryan R Harris wrote: > >>D. Bolliger wrote: >>>Mug am Mittwoch, 25. Oktober 2006 13:12: >>> I don't know if that anyway I can know what should I pass back from right hand side to left hand side, like : my $x = qw/a b c d e / ; # so I have $x = 5 >>>The list on the right hand side

Re: Is that I can do something like that ?

2006-10-25 Thread Bryan R Harris
> D. Bolliger wrote: >> Mug am Mittwoch, 25. Oktober 2006 13:12: >> >>> I don't know if that anyway I can know what should I pass back >>> from right hand side to left hand side, like : >>> >>> my $x = qw/a b c d e / ; # so I have $x = 5 >> >> The list on the right hand side is evaluated in sc

Re: Find all matches in a string via regex

2006-10-25 Thread C . R .
Well, that kinda worked. I had to change it to work on a scalar so this is what I wrote: $s=~s/(\d+ +cm)/$1/g; Input string: 144 cm Output string: 144 cm Why did I get duplicate and strings? Is the \G operator here and does v5.6.1 have it? Chuck -- To unsubscribe, e-mail: [EMAIL PROTECTE

Re: Spam from this list

2006-10-25 Thread Paul
On Wed, October 25, 2006 2:04 pm, Omega -1911 wrote: > On 10/25/06, Ron Goral <[EMAIL PROTECTED]> wrote: > > > Explains why my gmail account has over 700 spam messages (from the > last 30 days...) Gmail has done a good job in spotting them, but > something should be done about the archive. It isn

Re: Spam from this list

2006-10-25 Thread Paul
And here: http://www.ftc.gov/spam/ On Wed, October 25, 2006 2:13 pm, Paul wrote: > I use my email for many mailing lists, and I have noticed a very notable > increase in spam since joining this lists. I forward it all to: > [EMAIL PROTECTED] in hopes that someday (probably never) they can searc

Re: Spam from this list

2006-10-25 Thread Paul
I use my email for many mailing lists, and I have noticed a very notable increase in spam since joining this lists. I forward it all to: [EMAIL PROTECTED] in hopes that someday (probably never) they can search into their billions of spam forwards to find their evedence to present to some legal ca

Re: Spam from this list

2006-10-25 Thread Omega -1911
On 10/25/06, Ron Goral <[EMAIL PROTECTED]> wrote: Explains why my gmail account has over 700 spam messages (from the last 30 days...) Gmail has done a good job in spotting them, but something should be done about the archive. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Find all matches in a string via regex

2006-10-25 Thread D. Bolliger
C. Roberts am Mittwoch, 25. Oktober 2006 19:32: > I have Perl 5.6.1 on Sun Solaris. > > I am processing a text file which will be imported into our > typesetting software. In our typesetting software I want to make > sure a number does not separate from its unit of measure. So I want > to keep "21

Find all matches in a string via regex

2006-10-25 Thread C. Roberts
I have Perl 5.6.1 on Sun Solaris. I am processing a text file which will be imported into our typesetting software. In our typesetting software I want to make sure a number does not separate from its unit of measure. So I want to keep "21 cm" together by changing it to "21 cm". My problem is

Re: Is that I can do something like that ?

2006-10-25 Thread D. Bolliger
John W. Krahn am Mittwoch, 25. Oktober 2006 19:04: > D. Bolliger wrote: > > Mug am Mittwoch, 25. Oktober 2006 13:12: > >>I don't know if that anyway I can know what should I pass back > >>from right hand side to left hand side, like : > >> > >>my $x = qw/a b c d e / ; # so I have $x = 5 > > > > The

Re: Is that I can do something like that ?

2006-10-25 Thread John W. Krahn
D. Bolliger wrote: > Mug am Mittwoch, 25. Oktober 2006 13:12: > >>I don't know if that anyway I can know what should I pass back >>from right hand side to left hand side, like : >> >>my $x = qw/a b c d e / ; # so I have $x = 5 > > The list on the right hand side is evaluated in scalar context, an

RE: Spam from this list

2006-10-25 Thread Ron Goral
> -Original Message- > From: Mumia W. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 25 October, 2006 07:07 > To: Beginners List > Subject: Re: Spam from this list > > > On 10/25/2006 06:45 AM, Ron Goral wrote: > > Is anyone else receiving spam from this list? I use this email > address only

Re: Spam from this list

2006-10-25 Thread Mumia W.
On 10/25/2006 06:45 AM, Ron Goral wrote: Is anyone else receiving spam from this list? I use this email address only for this list, so it must be originating from someone on it. Any ideas? Spammers harvest e-mail addresses from mailing lists and their archives. If this list is archived on t

Re: Fw: Reg:need to find the particular pattern in a line and assign to variables.

2006-10-25 Thread D. Bolliger
pradeep reddy am Mittwoch, 25. Oktober 2006 13:52: > Hello, > > This is code I used and it executed in a wanted way. > > foreach $outLine(@problemLines) { > if ($outLine =~ "cleartool: Error: Unable to create label" ) { > my @values = split('"',$outline); > my @label = @values[1]; > my $pathName =

Re: Spam from this list

2006-10-25 Thread D. Bolliger
Ron Goral am Mittwoch, 25. Oktober 2006 13:45: > Is anyone else receiving spam from this list? > I use this email address only > for this list, so it must be originating from someone on it. Any ideas? Public mailing lists having a searchable public archive present the poster's email address to t

Re: Is that I can do something like that ?

2006-10-25 Thread Adriano Rodrigues
On 10/25/06, Adriano Rodrigues <[EMAIL PROTECTED]> wrote: On 10/25/06, Mug <[EMAIL PROTECTED]> wrote: > I actually want to write a piece of code like that : > > my %u_info = user_detail ( $ENV{QUERY_STRING} ); > # I have $u_info{id} = 'foo' , $u_info{pass} = 12345 > > my @attribs = user_detail (

Re: Spam from this list

2006-10-25 Thread Adriano Rodrigues
On 10/25/06, Ron Goral <[EMAIL PROTECTED]> wrote: Is anyone else receiving spam from this list? I use this email address only for this list, so it must be originating from someone on it. Any ideas? Don't you think spammers are everywhere, harvesting e-mail addresses? -- To unsubscribe, e-mail:

Re: Is that I can do something like that ?

2006-10-25 Thread Mumia W.
On 10/25/2006 06:12 AM, Mug wrote: Hi all, I don't know if that anyway I can know what should I pass back from right hand side to left hand side, like : my $x = qw/a b c d e / ; # so I have $x = 5 my ($x) = qw / a b c d e / ; # then I have 'a' or like $data = ; # reads 1 line from file; @dat

Re: Is that I can do something like that ?

2006-10-25 Thread D. Bolliger
Mug am Mittwoch, 25. Oktober 2006 13:12: > Hi all, Hello Mug I'm not shure if I understand your question... > I don't know if that anyway I can know what should I pass back > from right hand side to left hand side, like : > > my $x = qw/a b c d e / ; # so I have $x = 5 The list on the right han

Re: Fw: Reg:need to find the particular pattern in a line and assign to variables.

2006-10-25 Thread pradeep reddy
Hello, This is code I used and it executed in a wanted way. foreach $outLine(@problemLines) { if ($outLine =~ "cleartool: Error: Unable to create label" ) { my @values = split('"',$outline); my @label = @values[1]; my $pathName = @values[3]; my $Version = @values[5]; cleartool mklabel $RECURSE $R

Spam from this list

2006-10-25 Thread Ron Goral
Is anyone else receiving spam from this list? I use this email address only for this list, so it must be originating from someone on it. Any ideas? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Is that I can do something like that ?

2006-10-25 Thread Adriano Rodrigues
On 10/25/06, Mug <[EMAIL PROTECTED]> wrote: I actually want to write a piece of code like that : my %u_info = user_detail ( $ENV{QUERY_STRING} ); # I have $u_info{id} = 'foo' , $u_info{pass} = 12345 my @attribs = user_detail ( $ENV{QUERY_STRING} ); # I have @attribs = ( 'foo', 12345 ); while I

Is that I can do something like that ?

2006-10-25 Thread Mug
Hi all, I don't know if that anyway I can know what should I pass back from right hand side to left hand side, like : my $x = qw/a b c d e / ; # so I have $x = 5 my ($x) = qw / a b c d e / ; # then I have 'a' or like $data = ; # reads 1 line from file; @data = ; # reads all line from the file

Re: Fw: Reg:need to find the particular pattern in a line and assign to variables.

2006-10-25 Thread D. Bolliger
pradeep reddy am Mittwoch, 25. Oktober 2006 09:02: > John, > > Thx for your inputs. > > 1st i/p: Hello please don't top post so the discussion can be followed easily. > Iam afraid, I cant read each line from array problemLines to outLine. You don't show how you modified your code after John's a

Re: Worse than just a beginner

2006-10-25 Thread TeeBown
Brian wrote: I'm wondering if someone can do me an enormous favour and write a cgi for me please, I just can't get my head around the books I have, they might just as well be written in Klingon. I would like to be able to enter a number into a form. (eg 1234) This number would also be outpu

Re: how to use lwp-download

2006-10-25 Thread Rob Dixon
chen li wrote: Hi all, I need to download some files from a website. I try lwp-download and it works fine. But the problem is that it only supports downloading one file for each request. Is it possible to ask it download several files((such as files.*) by issueing one line code ? Thanks, Li

how to use lwp-download

2006-10-25 Thread chen li
Hi all, I need to download some files from a website. I try lwp-download and it works fine. But the problem is that it only supports downloading one file for each request. Is it possible to ask it download several files((such as files.*) by issueing one line code ? Thanks, Li ### c:\lwp-downlo

Re: Worse than just a beginner

2006-10-25 Thread Gav Ford
Brian wrote: I'm wondering if someone can do me an enormous favour and write a cgi for me please, I just can't get my head around the books I have, they might just as well be written in Klingon. I would like to be able to enter a number into a form. (eg 1234) This number would also be output t

Re: Fw: Reg:need to find the particular pattern in a line and assign to variables.

2006-10-25 Thread pradeep reddy
John, Thx for your inputs. 1st i/p: Iam afraid, I cant read each line from array problemLines to outLine. 2nd i/p: =~ /"([^"]+)"/g;--What is the logic in this expression? Can u bit ellaborate. I wanted to read the values in double quotes, from each line. And , Iam using this logic ---if