Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Open File and Parse file line by line

by dvergin (Monsignor)
on Feb 24, 2003 at 02:51 UTC ( [id://238009]=note: print w/replies, xml ) Need Help??


in reply to Open File and Parse file line by line

Your indenting and placement of curly brackets is somewhat inconsistent and, in places, misleading, but...

As best I can see at quick glance, your code consists of three subroutines. sub main calls find_copy_rename and create_text_file. But sub main itself is never called.

Perhaps you thought "main" would fire automatically. That is not the case in Perl.

Also, I would encourage you to call your subroutines with sub_name() rather than &sub_name. The latter form exposes @_ from the calling context in a way that could cause you confusion inside your sub.

Hope that helps.

------------------------------------------------------------
"Perl is a mess and that's good because the
problem space is also a mess.
" - Larry Wall

  • Comment on Re: Open File and Parse file line by line

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-23 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found