in reply to How can we interpolate an expression??
Try the following:
use Modern::Perl; my $number = 5; my $multiplier = 3; say "Product is @{[$number * $multiplier]}";
Output:
Product is 15
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can we interpolate an expression??
by Rohit Jain (Sexton) on Sep 20, 2012 at 18:33 UTC | |
by Kenosis (Priest) on Sep 20, 2012 at 18:42 UTC | |
by tobyink (Canon) on Sep 20, 2012 at 20:37 UTC | |
by Kenosis (Priest) on Sep 21, 2012 at 02:46 UTC | |
by tobyink (Canon) on Sep 21, 2012 at 05:49 UTC |