in reply to Re^2: How can we interpolate an expression??
in thread How can we interpolate an expression??
my $arrayref = [ 4200 / 100 ]; print "The answer is $arrayref \n";
my $arrayref = [ 4200 / 100 ]; print "The answer is @$arrayref \n";
my $arrayref = ; print "The answer is @[ 4200 / 100 ] \n";
syntax error at - line 1, near "= ;" Execution of - aborted due to compilation errors.
print "The answer is @{[ 4200 / 100 ]}\n";
|
|---|