Peter Keystrokes has asked for the wisdom of the Perl Monks concerning the following question:
Hi there,
I am trying to write a script that filters out irrelevant information.My file contains information in this format:
>hsa_circ_0067224|chr3:128345575-128345675-|NM_002950|RPN1 FORWARD
-4.4.. 6 .. 17 xxxxxxxxxxGTGAC CAGT ATGC ACTG AAGATGAGGTTTGTG
-0.9.. 5 .. 18 xxxxxxxxxxxGTGA CCAGT ATGC ACTGA AGATGAGGTTTGTGG
None.. 1 .. 20 xxxxxxxxxxxxxxx GTGACCAGTATGCACTGAAG ATGAGGTTTGTGGAC
I am trying to filter out all the lines beginning with 'None'. But the tricky part which I don't know how to go about doing is filtering out the lines which begin with a value which is greater than the value which the user has inputted in <STDIN>, because even if I capture the first 4 characters with a regex. This captured value does not directly correspond to a numerical value so I can't compare it to the <STDIN> value for filtering purposes. Is there another way I can go about doing this?
|
|---|