* Brian Volk ([EMAIL PROTECTED]) spake thusly: > Hello, hello.
> #!/bin/perl ^ \_______ there should be no leading space. #! should be the first 2 characters on the line. this is likely the cause of ./script.pl not working for you. > $datafile = "/files/perl/test.txt"; > $resultfile = ">/files/perl/outfile.txt"; # Note the '>' charater. > open(DATAFILE, $datafile); open(DATAFILE, $datafile) || die "could not open $datafile: $!"; > open(OUTPUTFILE, $resultfile); open(DATAFILE, $resultfile) || die "could not open $resultfile: $!"; by adding the die condition, you should get an error message telling you what the problem is. my immediate suspicion is that /files/perl/test.txt doesn't exist (unless you created it, it doesn't - RedHat has no /files directory on a standard installation). -- ____) ,_) ,_) (-(__ |_ _ _ |/ ____) | |(_)(_ |\ ( \_, _______________________________________________ | http://www.exitwound.org : hard to find | | http://www.buckowensfan.com : he's the man | _______________________________________________ | If God didn't mean for us to juggle, tennis | | balls wouldn't come three to a can. | _______________________________________________ -------------BEGIN GEEK CODE BLOCK------------- | Version: 3.1 | | GJ/IT d- s: a C+++>$ UL++++ P+++ L+++ E--- W++| | N+@ o K- w O- M- V PS+ PE Y+ PGP++ t+@ 5@ X++ | | R tv+@ b+ DI++++ D+ G++ e++++ h---- r+++ y+++ | --------------END GEEK CODE BLOCK-------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]