in reply to Re: Re: How does ~~ force string interpolation of code into scalar context?
in thread How does ~~ force string interpolation of code into scalar context?
I think these CAN be useful ... for decorative purposes ...
$arg1 = "arg1"; $arg2 = "arg2"; $arg3 = "arg3"; sub f1 { return "1"; } sub f2 { return "0"; } sub f3 { return "3"; } print "${\-+- f1( $arg1 )}"; print "${\+-+ f2( $arg2 )}"; print "${\-+- f3( $arg3 )}"; print "\n"
isn't that far better than the undecorated print statements? ( Same f1(), f2(), f3(), $arg1, $arg2, $arg3. )
print f1( $arg1 ); print f2( $arg2 ); print f3( $arg3 );
And FAR superior to the boring and mundane:
print "103\n";
--
TTTATCGGTCGTTATATAGATGTTTGCA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: How does ~~ force string interpolation of code into scalar context?
by davido (Cardinal) on Oct 27, 2003 at 01:01 UTC |