You can (since 5.8; see open, search for 'scalar'):
>perl -wMstrict -le "my $scalar_as_file; ;; open my $fh_scalar, '>', \$scalar_as_file or die qq{opening: $!}; printf $fh_scalar q{xxx :%#x: yyy}, 55473; close $fh_scalar; ;; print qq{scalar as file: '$scalar_as_file'}; " scalar as file: 'xxx :0xd8b1: yyy'
In reply to Re^3: getting wrong value
by AnomalousMonk
in thread getting wrong value
by ggrise
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |