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

Re: Putting a filename as a parameter to a perl script then reading from it in the code?

by Utilitarian (Vicar)
on Dec 07, 2012 at 12:39 UTC ( #1007729=note: print w/replies, xml ) Need Help??


in reply to Putting a filename as a parameter to a perl script then reading from it in the code?

ICL VME, >shudder<that brings back memories...
$ARGV[0] is the first paramter supplied to your script.
When you have to parse a common file format, the first response should be to search CPAN (or for a faster response, metacpan.org)for the format, there you will discover Text::CSV a module which handles all the edge cases that may arise in your data.

Welcome to Perl, you'll find it much handier to script in than scl once you get the hang of it...

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
  • Comment on Re: Putting a filename as a parameter to a perl script then reading from it in the code?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007729]
help
Chatterbox?
[rajesh_perl]: Hi
[rajesh_perl]: thanks for editing it
beech testing firefox 52.0.1
beech me me me me
beech mi
beech eieie
beech .oO( *you* don't exist, I'm only messaging to *me* self),
[beech]: *me

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2017-03-28 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (327 votes). Check out past polls.