File '-4294967295' does not exist.
But after staring at the code for 10 minutes I still don't see how the filename is getting replaced with a number. Here's the relevent block:Then, at last, I see it - I'm using the =-~ operator rather than the =~ operator! Perl has taken my typo and turned it into an attempt to negate the bitwise inverse of the result of running a regex against $_. Sheesh!my $file = shift @ARGV; die "Backup filename '$file' should end in .kba or .kba.gz.\n" unless $file =-~ /kba\.gz$/ or $file =~ /\.kba$/; die "File '$file' does not exist.\n" unless -e $file;
-sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: An Insane Typo Bug
by pg (Canon) on Nov 05, 2003 at 23:56 UTC | |
|
Re: An Insane Typo Bug
by Willard B. Trophy (Hermit) on Nov 07, 2003 at 20:18 UTC |