in reply to Re: =~ matches non-existent symbols
in thread =~ matches non-existent symbols
As a side note, there are some commonly agreed best practices in the Perl community. Among them:
#!/usr/bin/perl use strict; use warnings; my $infile = shift; open my $INPUT_FILE, "<", $infile" or die "can't open $infile: $!"; local $/; # the whole file will be slurped, even if it has several lin +es my $dna = <$INPUT_FILE>; if ( $dna =~ m/[^actg\s]/i ) { print "File contains something besides actg sequence.\n"; } else { print "good!\n"; } close $INPUT_FILE;
|
|---|