Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Using the read function...

by John M. Dlugosz (Monsignor)
on Oct 08, 2001 at 20:48 UTC ( #117500=note: print w/replies, xml ) Need Help??


in reply to Using the read function...

If your quotes are necessary because your fields contain spaces or other special chars, don't use split. Rather, use a module that processes quotes and comma lists (you don't have commas, but you don't have to draw upon that feature. The quotes is the hard part). Search CPAN for "quote" and such. I know they exist, but am not familiar with specific modules.

It would be simpler to assign to hash members, not variables, with the results. E.g.

foreach (my $input) @data { my ($key, $value)= parseline ($input); $results{$key}=$value; }
—John

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2019-10-20 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?