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
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
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
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,
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
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,
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
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
> -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
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
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
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
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
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
$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 !
>
>
&
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
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
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.
--
18 matches
Mail list logo