in reply to Re: Writing to file part deux
in thread Writing to file part duex

I had tried my ($locus) = /LOCUS\s*(\w+)/; But it still doesn't capture it.
I have just realized this is because the variable is being overwritten since it is searching line by line in the <$in>.
How do I get around that?

Replies are listed 'Best First'.
Re^3: Writing to file part deux
by ikegami (Patriarch) on Jul 23, 2009 at 23:28 UTC
    my $locus; while (...) { ... ($locus) = /.../; ... }
      I tried that but it still gives me initialized value $locus for each line of the <$in>...
        Then there's something wrong elsewhere. Please post your code as I care to avoid endlessly speculating what your code looks like.