Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: __DATA__ read/write as configuration file

by broquaint (Abbot)
on Jul 17, 2003 at 23:47 UTC ( #275451=note: print w/replies, xml ) Need Help??

in reply to __DATA__ read/write as configuration file

How do I do this? read __DATA__ then seek to 0 then write over it?
Yes, just open up the current script and write to it like you would any other file e.g
use Fatal qw/ open seek /; open(my $d => '+<', $0); seek $d => 0, 2; print $d @ARGV; __DATA__ foo bar
This will append @ARGV to the __DATA__ section of the currently executing script. Of course modify the seek as you see fit and if you're going to completely overwrite it then remember it's position with a quick tell.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://275451]
[muthusathish]: Hi All i need a help
[Eily]: hello muthusathish, we have many helps here
[muthusathish]: i have a perl based dll, how to decompile
[hippo]: :-D
[Eily]: you mean a dll where the SW was written in perl? That sounds unlikely
[muthusathish]: please help me regarding this
[hippo]: Easier just to go and look at the source, no?
[Eily]: mostly because perl isn't compiled in the usual sense of the meaning, you can't execute the opcodes directly, you need the perl engine

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2018-02-23 09:08 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (301 votes). Check out past polls.