RE: Nested hash creation help !

2003-01-21 Thread Scot
Thanks to Jose and all others who posted. I now have a working nested hash and a better understanding of them. Scot -Original Message- From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 7:34 AM To: [EMAIL PROTECTED] Subject: RE: Nested hash creation help

RE: Nested hash creation help !

2003-01-21 Thread Scot Needy
tc } } } -Original Message- From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 20, 2003 6:11 AM To: [EMAIL PROTECTED]; Beginners Perl Subject: RE: Nested hash creation help ! Afterwards, to see how your nested hash looks like, try this: use Data::Dumper

Re: Nested hash creation help !

2003-01-20 Thread Jeff 'japhy' Pinyan
On Jan 20, John W. Krahn said: >Jeff 'Japhy' Pinyan wrote: >> >> split(" ", " ab cd ef ") -> "ab", "cd", "ef" >> split(/\s+/, " ab cd ef ") -> "", "", "ab", "cd", "ef" > ^^ >Where did that extra string come from? :-) Oops. Yes, there should

Re: Nested hash creation help !

2003-01-20 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > split(" ", " ab cd ef ") -> "ab", "cd", "ef" > split(/\s+/, " ab cd ef ") -> "", "", "ab", "cd", "ef" ^^ Where did that extra string come from? :-) John -- use Perl; program fulfillment -- To unsubscribe,

Re: Nested hash creation help !

2003-01-20 Thread John W. Krahn
Rob Dixon wrote: > > John W. Krahn wrote: > > > > So, you are saying that: > > > > split ' '; > > > > Is the same as: > > > > split m' '; > > > > And the same as: > > > > split / /; > > The second and third are the same. The first one, a > single space, is a special case. It splits on

Re: Nested hash creation help !

2003-01-20 Thread Jeff 'japhy' Pinyan
On Jan 20, John W. Krahn said: >Rob Dixon wrote: >> >> Sure. I'm saying that >> >> split '\.'; >> >> actually compiles as >> >> split m'\.' >> >> and is therefore the same. It has to be a valid quotation character >> though, because anything else won't be recognised out of context. > >So,

Re: Nested hash creation help !

2003-01-20 Thread Rob Dixon
John W. Krahn wrote: > > So, you are saying that: > > split ' '; > > Is the same as: > > split m' '; > > And the same as: > > split / /; The second and third are the same. The first one, a single space, is a special case. It splits on whitespace the same as: split; and split

Re: Nested hash creation help !

2003-01-20 Thread John W. Krahn
Rob Dixon wrote: > > John W. Krahn wrote: > > Rob Dixon wrote: > >> > >> John W. Krahn wrote: > >>> Scot Needy wrote: > > ($wwwname,$cust,$YYMMDDay) = split('\.',$_); > >>> > >>> The first argument to split is a regular expression. > >>> > >>> my ( $wwwname, $cust, $YYMMDDay

RE: Nested hash creation help !

2003-01-20 Thread NYIMI Jose (BMB)
> -Original Message- > From: Scot Needy [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 20, 2003 4:58 PM > To: NYIMI Jose (BMB); Beginners Perl > Subject: RE: Nested hash creation help ! > > > > Thanks Jose! > > I have the hash created and no

Re: Nested hash creation help !

2003-01-20 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: >> >> John W. Krahn wrote: >>> Scot Needy wrote: ($wwwname,$cust,$YYMMDDay) = split('\.',$_); >>> >>> The first argument to split is a regular expression. >>> >>> my ( $wwwname, $cust, $YYMMDDay ) = split /\./; >> >> But, as it has an im

Re: Nested hash creation help !

2003-01-20 Thread John W. Krahn
Rob Dixon wrote: > > John W. Krahn wrote: > > Scot Needy wrote: > >> > >> ($wwwname,$cust,$YYMMDDay) = split('\.',$_); > > > > The first argument to split is a regular expression. > > > > my ( $wwwname, $cust, $YYMMDDay ) = split /\./; > > But, as it has an implied 'm', I don't know

Re: Nested hash creation help !

2003-01-20 Thread Rob Dixon
Scot Needy wrote: > Hi; > > Trying to crate a nested hash from variables parsed out of log files > but as I am a "Beginner Perl' coder it is failing terribly. The basic > question is given you have 5 variables how would you make a nested > hash. > > Thanks ! > Scot > > I hope this is enough code t

Re: Nested hash creation help !

2003-01-20 Thread Rob Dixon
John W. Krahn wrote: > Scot Needy wrote: >> >> Hi; > > Hello, > >> Trying to crate a nested hash from variables parsed out of log >> files but >> as I am a "Beginner Perl' coder it is failing terribly. The basic >> question >> is given you have 5 variables how would you make a nested hash. >> >> I

RE: Nested hash creation help !

2003-01-20 Thread NYIMI Jose (BMB)
Afterwards, to see how your nested hash looks like, try this: use Data::Dumper; print Dumper(\%time); José. > -Original Message- > From: Scot Needy [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 20, 2003 6:50 AM > To: Beginners Perl > Subject: Nested has

RE: Nested hash creation help !

2003-01-20 Thread NYIMI Jose (BMB)
$site}{$YYMMDDay}=$hhmmss; } close(LOG); etc etc ... } Not tested ! HTH, José. > -Original Message- > From: Scot Needy [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 20, 2003 6:50 AM > To: Beginners Perl > Subject: Nested hash creation help ! > > &

Re: Nested hash creation help !

2003-01-20 Thread John W. Krahn
Scot Needy wrote: > > Hi; Hello, > Trying to crate a nested hash from variables parsed out of log files but > as I am a "Beginner Perl' coder it is failing terribly. The basic question > is given you have 5 variables how would you make a nested hash. > > I hope this is enough code to example m

RE: Nested hash creation help !

2003-01-20 Thread Duarte Cordeiro
gal Tel: +351 21 423-8350 | Fax: +351 21 421-7626 | Mob: +35191 613-5706 -- -Original Message- From: Scot Needy [mailto:[EMAIL PROTECTED]] Sent: Monday, January 20, 2003 5:50 AM To: Beginners Perl Subject: Nested hash creation help ! Hi; Trying to crate a nested hash from var

Nested hash creation help !

2003-01-20 Thread Scot Needy
Hi; Trying to crate a nested hash from variables parsed out of log files but as I am a "Beginner Perl' coder it is failing terribly. The basic question is given you have 5 variables how would you make a nested hash. Thanks ! Scot I hope this is enough code to example my problem. --