I tried to implement the special number regex as such:
#!/usr/bin/env perl
use strict;
use warnings;
use Regexp::Common;
print "Enter limit: ";
chomp( my $limit = <STDIN> );
$limit = abs($limit);
open my $IN, '<', "xt_spacer_results.hairpin" or die $!;
open my $SIFTED, '>', "new_xt_spacer_results.hairpin" or die $!;
while (<$IN>){
next if /^None/;
next if /^( $RE{num}{real}{-places=>2})/ && $1 > $limit;
print $SIFTED $_;
}
close $IN;
close $SIFTED;
But it aborts the program due to use Regexp::Common; and it states:
Can't locate Regexp/Common.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at energy_sifter2.pl line 4.
BEGIN failed--compilation aborted at energy_sifter2.pl line 4.
I'm not quite sure how to use modules. Do I download the module somehow and save it in the same file I'm working in?