in reply to use of <STDOUT>
How about just using back-tick? return `pwd`;
Since this sort of thing is done so often, the "back-tick" quote-mark causes the enclosing command to be executed and the result returned as a character string. Your entire subroutine becomes ... unnecessary. :-O
On my keyboard, this character (along with tilde "~") is located on the upper-left side, to the left of the numeral-"1" key.
“This is Perl. There is more than one way to do it.™ ”
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: use of <STDOUT>
by Fletch (Bishop) on Mar 06, 2008 at 23:11 UTC | |
by PerlZealot (Acolyte) on Mar 06, 2008 at 23:42 UTC |