in reply to wierd output
Start by reading perlintro and Coping with Scoping and write subs like this
sub cheat { my( $cheatfile ) = @_; open my($info), '<', $cheatfile or die "Can't open( $cheatfile ): +$!"; while(<$info>){ print $_; } close $info; }
and use it like
cheat( "/home/cheatsheets/$prefix.txt" );
If you want help with that $session stuff, you'll have to explain what that is (How do I post a question effectively? ) although it could be buffering, terminal ansi escapes, or just something else.
in case of buffering :) Tutorials: Input and Output: Suffering from Buffering?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: wierd output
by Anonymous Monk on Dec 17, 2012 at 12:58 UTC |