Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl # Write Script ($a, $b) = split('=', $ENV{'QUERY_STRING'}); $b =~ tr/+/ /; $b =~ s/%(..)/pack("C", hex($1))/eg; open(FILE, ">wrfile.txt"); print FILE $b; close( FILE ); ---------------------------------------- #!/usr/bin/perl # Read Script (Doesn't print updated strings) open(FILE, "<wrfile.txt"); while(<FILE>){ print "Content-type: text/html\n\n"; print $_; } close(FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File I/O Help
by swiftone (Curate) on Jun 06, 2000 at 19:36 UTC | |
|
Re: File I/O Help
by Corion (Patriarch) on Jun 06, 2000 at 17:45 UTC | |
|
Re: File I/O Help
by lhoward (Vicar) on Jun 06, 2000 at 18:20 UTC | |
|
Re: File I/O Help
by chromatic (Archbishop) on Jun 07, 2000 at 02:50 UTC |