Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Where is my output stream to a file going?

by davido (Cardinal)
on Mar 30, 2011 at 05:56 UTC ( [id://896322]=note: print w/replies, xml ) Need Help??


in reply to Where is my output stream to a file going?

If you're getting a blank outfile, that either means print is failing (you could check by putting "or die $!" after your print statement), or your if( $fields[5] =~ m/Withdrawn/ ) {... is never matching.

I suspect the latter. So why would your match fail if the data is coming from a file, but not if coming from a __DATA__ block? You'll have to investigate that yourself. But here are a few possibilities: There's an extra tab in there somewhere making 'Withdrawn' actually live one column to the right. There aren't enough tabs, making 'Withdrawn' live to the left of where you're expecting it. Your tabs in the file are actually a fixed number of spaces rather than an actual tab character. Your data is mistyped. ...one of those are the likely culprits.


Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2026-03-06 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.