For the above code $result get return value of "1". You want to get $result is "Hello world" you will be use the sprintf function.my $result = print "hello world\n";
my $var="Some Text"; my $result = sprintf "$var hello world "; print "$result\n";
In reply to Re: how to get value of print command
by k_manimuthu
in thread how to get value of print command
by jaydot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |