in reply to Re: =~ matches non-existent symbols
in thread =~ matches non-existent symbols

Thanks, graff! But what if I need to do further manipulations with the data from the file later in the same program?

Replies are listed 'Best First'.
Re^3: =~ matches non-existent symbols
by graff (Chancellor) on Nov 17, 2014 at 10:18 UTC
    what if I need to do further manipulations with the data from the file later in the same program?

    Presumably, the manipulation will depend on whether the file content is "good" or "bad" - in either case, just save a copy of $_ to some other variable after white-space removal but before removing "acgt"; then pass that copy to whatever function you write to do the manipulation (either good or bad).

Re^3: =~ matches non-existent symbols
by Laurent_R (Canon) on Nov 17, 2014 at 07:20 UTC
    This will be for a second step. Right now, you are saying that your file contains only /ACGT/i but that your validation procedure fails. Many of us think that it is likely that your file contains at least one line feed or carriage return character or a combination of both. The important thing right now is to find out what are the hidden characters that lead your validation subroutine to fail. Once you know that, you can modify your original program or your regex to take the findings into account.