Any Perl versions of ...

2002-10-26 Thread Paul Company
I'm looking for the following programs written in portable Perl. What I mean by "portable" is the script doesn't contain system() or backticks (``). vi written in perl cvs written in perl gzip written in perl Please reply to my email address: [EMAIL PROTECTED] thank you. --pjc -- To unsubs

Null character

2002-05-22 Thread Paul Company
What is the NULL character in Perl? $tenNULLs = \x00 x 10; print $tenNULLs; Here's the output : SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c)SCALAR(0x10057c) I was expecting ^@ not SCALAR(0x10057c

Perl Question

2002-05-22 Thread Paul Company
I want to replace a string "/usr/local" with another string "/tmp/local" in a binary file. This is what I wrote: #!/usr/local/bin/perl $file = "./mybinaryfile.out"; $s1 = `strings $file | grep -b /usr/local`; # returned 2027:/usr/local/conf/ ($byteoffset, $string) = split /:/, $s1; $slen = len