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.