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

Re^2: Cannot work on second file after reading first file.

by 1straw (Novice)
on Feb 28, 2014 at 19:06 UTC ( [id://1076598]=note: print w/replies, xml ) Need Help??


in reply to Re: Cannot work on second file after reading first file.
in thread Cannot work on second file after reading first file.


Thank you sn1987a! This solved the problem.

I will learn to use Data::Dumper & read the debugger tutorial suggested as well.

SUMMARY:

1) A subroutine to open and read a CSV file worked fine in isolation but stopped working when integrated into larger script.

2) The problem stemmed from an earlier subroutine (open_po) which globally modified the input record separator ($/) through: undef $/;

3) The problem code was modified to change the state locally, according to sn1987a's post to: local ($/);

4) This modification solved the problem.

Thank you all for your help!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-03-28 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found