Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Memory File and wxPerl

by stevieb (Canon)
on Mar 16, 2016 at 19:59 UTC ( [id://1157996]=note: print w/replies, xml ) Need Help??


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

    Thanks stevieb for the clear example. I had played around with a similar structure, but haven't yet worked through all of the errors that popped up.

    James

    There's never enough time to do it right, but always enough time to do it over...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1157996]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found