Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Transforming a scalar to an array

by ikegami (Patriarch)
on Jul 15, 2009 at 14:59 UTC ( [id://780345]=note: print w/replies, xml ) Need Help??


in reply to Transforming a scalar to an array

#!/usr/bin/perl use strict; use warnings; chomp( my @input = <> );

Update: Oh, it seems you aren't reading from a file handle as you showed.

chomp( my @input = split(/^/m, $input) );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2025-12-11 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (92 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.