in reply to Perl 5.12: layers and opening scalars as file handles

I tried it with '<:raw' and got "no such file". I tried it with '<&=:raw' and got "Bad filehandle". A simple '<' did the trick. I added binmode also.  my $r = \$text; was a noop. Bettter to do my $r = text and use \$r in the open. When I used \$text, nothing printed.
#!/usr/bin/perl -slw use strict; my $text = "Hello World\n123\na short text\n"; my $r = $text; open my $fh, '<', \$r or die $!; my @lines = <$fh>; binmode $fh, ":raw"; close $fh or die "unable to close: $!"; print @lines;