in reply to Memory File and wxPerl
Here's an example of read and write using a memory 'file' utilizing a scalar. Give it a try and see if Wx will be ok with it:
use warnings; use strict; my $read_memfile = <<'EOF'; one two three EOF open my $mem_fh, '<', \$read_memfile; print $_ while(<$mem_fh>); close $mem_fh; my $write_memfile; open my $mem_wfh, '>', \$write_memfile; print $mem_wfh "hello, world!\n"; close $mem_wfh; open my $str_fh, '<', \$write_memfile; print $_ while (<$str_fh>); close $str_fh; __END__ one two three hello, world!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Memory File and wxPerl
by jmlynesjr (Deacon) on Mar 18, 2016 at 15:58 UTC |