Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Yet another array problem

by blazar (Canon)
on Jul 31, 2005 at 15:07 UTC ( [id://479705]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for my $line (@lines) {
        my @tmp=split ' ', $line;
        push @words, $tmp[0];
    }
    
  2. or download this
    push @words, (split)[0] for @lines;
    
  3. or download this
    @words=map +(split)[0], @lines;
    
  4. or download this
    use strict;  # along with
    use warnings;
    
  5. or download this
    my @array = ();
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-24 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found