Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Is this a correct way of obtaining input from a file?

by physgreg (Scribe)
on Aug 06, 2002 at 20:55 UTC ( [id://188157]=note: print w/replies, xml ) Need Help??


in reply to Is this a correct way of obtaining input from a file?

I would replace your first snippet with
my @fields; while (<DATAFILE>) { chomp; push @fields, $_; }
This will give you an array with the correct values. If you want to assign it to a variable, then do:
my ($TRACK, $pager, $service) = @fields;
I haven't tested this, but it should be ok!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-25 08:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found