in reply to Using Strings as File Handlers
#!/usr/bin/perl use strict; use warnings; my $string = 'my-test-string'; open(my $fh, '>', \$string) or die "Could not open string for writing"; print $fh "my-test-string\n"; open($fh, '<', \$string) or die "Could not open string for reading"; my $x = <$fh>; print $x, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Strings as File Handlers
by Corion (Patriarch) on Jan 04, 2010 at 09:20 UTC |