strredwolf has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -0777 $f=<STDIN>; #suck the whole file in. $d='16i[[z]P]sZ[[y]P]sY[la55~21+Sb55~21+Sb55~21+Sb55~21+'. 'Sb21+PLbPLbPLbPLbP]sX[?dsa0=Zla20202020=YlXxlAx]dsAx'; # DC Code. Basically take a 4 byte word and encode it into # 5 bytes. Until it gets the signal to quit, of course. open(DC,"|dc -e '$d' > out.d8a"); # open up DC while($f) { $f=~s/^(.{0,4})//s; $z=$1; $l+=length $z; # grab 4 bytes $z.="\0" while((length $z) < 4); # pad it to spec $z=unpack("H*",$z); print DC "\U$z\E\n"; # send it to DC } print DC "q\n"; # tell DC to quit.
--
$Stalag99{"URL"}="http://stalag99.keenspace.com";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Caputuring output while inputting to dc...
by czarfred (Beadle) on Sep 21, 2001 at 22:08 UTC | |
|
Re: Caputuring output while inputting to dc...
by coolmichael (Deacon) on Sep 21, 2001 at 21:51 UTC | |
|
Re: Caputuring output while inputting to dc...
by blakem (Monsignor) on Sep 21, 2001 at 21:36 UTC |