#!/usr/bin/perl -w $file=$ARGV[0]; @params=<STDIN>; %numberoftimes={}; $nuoftimes=0; while(<FH>){ @lines=split("\n",$file); for $line(@lines){ for $p(@params){ if (index($line,$p)){ nuoftimes++; #create a new file } $%numberoftimes{$p}=$nuoftimes; #every time $p is found in $line, #i have to write that $line in the new file elsif($p eq "end") #the input of the parameters should end } } }
In reply to Re^2: PERL searching through a file
by ssimone
in thread PERL searching through a file
by ssimone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |