Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Not printing when expected.

by Laurent_R (Prior)
on May 26, 2014 at 21:46 UTC ( #1087446=note: print w/ replies, xml ) Need Help??


in reply to Not printing when expected.

no_slogan said it all, or almost, but I wish to add that when you print to standard output (STDOUT), you'll get your output immediately provided that you have a newline character at the end, which is what is lacking in your program. If you had:

print "\n $station \n";
instead of what you have:
print "\n $station";
you would see the result immediately because printing to the terminal is line-buffered (meaning that, by default, it is printed as soon as a newline character is printed out). Printing to a file is a different story, it will be delayed by default, but this is very well explained in Mark-Jason Dominus' article referred to by no_slogan.


Comment on Re: Not printing when expected.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-07-07 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls