in reply to =~ matches non-existent symbols
Okay, so, I slightly corrected my original code, and now it works fine.
#!/usr/bin/perl -w use strict; open (INPUT_FILE, "$ARGV[0]") || die "can't open file: $!"; if ( <INPUT_FILE> =~ m/[^actgACTG\s]/ ) { print "File contains something besides actg sequence.\n"; } else { print "good!\n"; } close INPUT_FILE;
Are there any potential problems with this code?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: =~ matches non-existent symbols
by graff (Chancellor) on Nov 17, 2014 at 22:30 UTC | |
|
Re^2: =~ matches non-existent symbols
by Laurent_R (Canon) on Nov 17, 2014 at 22:02 UTC | |
|
Re^2: =~ matches non-existent symbols
by AnomalousMonk (Archbishop) on Nov 17, 2014 at 22:27 UTC |