AW: Testing File Contents

2011-03-02 Thread Christian Marquardt
The easiest way in my opinion is to use the 'grep' function like this: my $searchstring="whatever"; open CFG, '<', $_file || die("could not open file: $_file!"); my @data=; close CFG; if ( grep /$searchstring/i, @data ) { print "$searchstring found\n"; } If you negate the grep like this: @data

Re: 1st line of perl script

2011-01-10 Thread Christian Marquardt
Maybe you can use "use warnings;" for this ... Best regards Christian Am 10.01.11 13:49 schrieb "Sunita Rani Pradhan" unter : >We have -w option for warnings which we specify with the 1st line . How >does it work on windows ? > >-Sunita > >-Original Message- >From: Donald Calloway [m