Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Stubborn as a Saint

by Ovid (Cardinal)
on Apr 26, 2001 at 22:07 UTC ( [id://75844]=monkdiscuss: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    %author = map  { /^\d{6}$/ ? $_ : [ split( /\|/, $_, 2 ) ] }
              map  { split( /=/, $_, 2 ) } 
              grep { /^\d{6}=[^|]+\|/ } <FH>;
    
  2. or download this
    my %author;
    while (<FH>) {
    ...
        my($l, $r)  = split /=/, $_, 2;
        $author{$l} = [ split /\|/, $r, 2 ];
    }
    
  3. or download this
    my %author;
    while (<FH>) {
        next unless /^(\d{6})=([^|]+?)\|(.*)/;
        $author{$1} = [ $2, $3 ];
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://75844]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-29 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found