A
Alex Lee
Dear all:
I know this is going to sound strange but is there any way I can
convert a perl script ot binary 0's and 1's and excute it.
---------------------------------------------------------------
For example: print "fox";
represent it as 0's and 1's save or store it somewhere and have perl
excute the binary directly.
So far ...
I tried to convert every character to ASCII representation
unpack("c*",'letter');
my $str = unpack("B32", pack("N", shift)); # convert it binary
store it. When I want to excute it, I figure that I could work
backwards and run the script via eval.
But this seems awfully slow - one character at a time.
----------------------------------------------------------------
Just wanted to know if anyone knows of a better way to do this. It
would be very nice if I can run the script after its been converted to
binary directly instead of having to convert it back to ascii and run
the script.
Thanks a bunch guys!
al
I know this is going to sound strange but is there any way I can
convert a perl script ot binary 0's and 1's and excute it.
---------------------------------------------------------------
For example: print "fox";
represent it as 0's and 1's save or store it somewhere and have perl
excute the binary directly.
So far ...
I tried to convert every character to ASCII representation
unpack("c*",'letter');
my $str = unpack("B32", pack("N", shift)); # convert it binary
store it. When I want to excute it, I figure that I could work
backwards and run the script via eval.
But this seems awfully slow - one character at a time.
----------------------------------------------------------------
Just wanted to know if anyone knows of a better way to do this. It
would be very nice if I can run the script after its been converted to
binary directly instead of having to convert it back to ascii and run
the script.
Thanks a bunch guys!
al