Wagner wrote:
>
> Hi,
Hello,
> Though this thread is now almost a week old, I thought I'd offer one more
> suggestion. How about using this
>
> %people = map { chomp; split } ;
>
> in place of
>
> %people = ;
>
> To my eyes, it is cleaner than adding an explicit loop.
The chom
From: Jose Malacara [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 2:35 AM
To: Perl beginners
Subject: open file into hash
Hello. I was wondering if there was a way to open a file into a hash? I know
this works for arrays, but was wondering if I this could be done for a hash
also.
I h
Jose Malacara wrote:
>
> Hello. I was wondering if there was a way to open a file into a hash? I know
> this works for arrays, but was wondering if I this could be done for a hash
> also.
>
> I have a file called people.data, which contains two colums:
> jose2
> karen 8
> j
Thanks to all who replied with the useful advice. I really appreciate the
help. Thanks!
Jose
- Original Message -
From: "Tor Hildrum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Perl" <[EMAIL PROTECTED]>
Sent: Wednesday, August 14, 2002 3:
On Wed, 14 Aug 2002, Andy Anderson wrote:
> Hi:
>
> By first changing the % sign to a $ sign and then removing {jose} in the
> print line I got it to work. I tested it in both Windows and Linux
> environments with the same results.
The % specifies that the identifier is a hash and the $ means i
se Malacara" <[EMAIL PROTECTED]>
To: "Perl beginners" <[EMAIL PROTECTED]>
Sent: Wednesday, August 14, 2002 12:35 AM
Subject: open file into hash
Hello. I was wondering if there was a way to open a file into a hash? I know
this works for arrays, but was wondering if I thi
on Wed, 14 Aug 2002 07:35:29 GMT, [EMAIL PROTECTED] (Jose Malacara)
wrote:
> I have a file called people.data, which contains two colums:
> jose 2
> karen 8
> jason 9
> tracey 1
> Can someone tell me what I am doing wrong here:
> #! /usr/bin/perl -w
> open (INPUT,
On Wed, 14 Aug 2002, Jose Malacara wrote:
> Hello. I was wondering if there was a way to open a file into a hash? I know
> this works for arrays, but was wondering if I this could be done for a hash
> also.
>
> I have a file called people.data, which contains two colums:
> jose 2
> ka
<[EMAIL PROTECTED]> wrote:
> I have a file called people.data, which contains two colums:
> jose2
> karen8
> jason9
> tracey1
>
>
> Can someone tell me what I am doing wrong here:
> =
> #! /usr/bin/perl -w
>
> open (INPUT,
Hello. I was wondering if there was a way to open a file into a hash? I know
this works for arrays, but was wondering if I this could be done for a hash
also.
I have a file called people.data, which contains two colums:
jose2
karen 8
jason 9
tracey 1
Can someo
10 matches
Mail list logo