snowrider has asked for the wisdom of the Perl Monks concerning the following question:
and here is the error i am getting#!/opt/perl5/bin/perl -w use strict; my %lines; my @dupes; while($_ =<> and $_ ne "quit\n"){ $lines{$_}++; if($lines{$_} == 2){ push @dupes, $_; } } if(@dupes){ print "Here are your duplicate lines\n\n"; foreach(@dupes){ print $_; } } else { print "\nNo Duplicates Found!\n"; }
snowriderValue of <HANDLE> construct can be "0"; test with defined() at day1_te +st.1.pl line 8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: errors
by btrott (Parson) on Feb 02, 2001 at 02:54 UTC | |
|
Re: errors
by dws (Chancellor) on Feb 02, 2001 at 03:54 UTC | |
|
Re: errors
by autark (Friar) on Feb 02, 2001 at 02:56 UTC | |
|
Re: errors
by InfiniteSilence (Curate) on Feb 02, 2001 at 02:55 UTC | |
|
Re: errors
by snowrider (Pilgrim) on Feb 02, 2001 at 03:03 UTC |