Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: wrong output

by apl (Monsignor)
on Jul 02, 2009 at 14:04 UTC ( [id://776753]=note: print w/replies, xml ) Need Help??


in reply to Re: wrong output
in thread wrong output

In the spirit of further simplification (and, just as important, encapsulating the output), this
printf $outFile "Success,"; print "In Success,\n"; my $ErrorMsg = "null"; while ($line = <DATA>) { if ($line =~ /$match/) { print "$2\n"; printf $outFile "$2, ${1}, $ErrorMsg\n"; return; } }
could be converted to a subroutine that would have parameters of "Success" and "null" (or "Error" and $1) passed to it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-18 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found