jaydot has asked for the wisdom of the Perl Monks concerning the following question:
hi just wanna ask is it possible for perl to get the value of a print command? for ex.
my $result = print "hello world\n"; print "$result\n";
why is it that the "print $result" would print a value which is 1?.. is it possible to get the result "hello world" not 1?... how do i do it?.. .how do i change my code? help please.
Update: tnx..u solved the problem.. this is what i really need..tnx for ur time..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to get value of print command
by marto (Cardinal) on May 13, 2010 at 06:59 UTC | |
|
Re: how to get value of print command
by CountZero (Bishop) on May 13, 2010 at 07:39 UTC | |
|
Re: how to get value of print command
by jau (Hermit) on May 13, 2010 at 08:29 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |