#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11153644 use warnings; $SIG{__WARN__} = sub { die @_ }; my $cat = { dog => 'golden retriever' }; my $x='$cat->{dog}/mouse'; my $y=localtime(); $_=$x; my $z = "$_:$y"; my $z2 = eval qq("$_:$y"); print "$z\n"; print "$z2\n";
Outputs:
$cat->{dog}/mouse:Mon Jul 31 12:36:50 2023 golden retriever/mouse:Mon Jul 31 12:36:50 2023
In reply to Re: Why is this string only PARTIALLY interpolated?
by tybalt89
in thread Why is this string only PARTIALLY interpolated?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |