I'm trying to match a line that starts with >, but does not work...
#!/usr/bin/perl
while ($lines = <>) {
$count++;
if (/^\#/) {
next;
}
elsif (/^>/) {
print "hola";
}
}
Any idea?
I'm trying to match a line that starts with >, but does not work...
#!/usr/bin/perl
while ($lines = <>) {
$count++;
if (/^\#/) {
next;
}
elsif (/^>/) {
print "hola";
}
}
Any idea?
you are trying to match $_ and not $lines change it to
#!/usr/bin/perl
while ($lines = <>) {
$count++;
if ($lines =~ /^\#/) {
next;
}
elsif ($lines =~ /^>/) {
print "hola";
}
}