Search Results

Search: Posts Made By: hploh
2,284
Posted By chacko193
Does the file exists? The error is coming because...
Does the file exists? The error is coming because the script is unable to find the input file. Try giving the full path to the input file or else it will check for the input file in cwd.
2,284
Posted By chacko193
Try: ...
Try:

open(FH,"</path/to/your/file/filename");
my @file = <FH>;
close FH;
my $line;
foreach $line (@file) {
if ( $line ~= m/1/) {
#Do your thing.
} elsif { $line ~= m/0/) {
...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 08:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy