this is sql1 line1 this here is sql2 and now we have sql3 for a change #### #!/usr/bin/env perl use warnings; use strict; my $FileName = $ARGV[0]; my $String = $ARGV[1]; open(INFILE, $FileName) or die "Cant open the file\n"; # read in each line of the input file while () { if (/$String/) { # If the $String is found... s/^.*$String//; # Delete $String and everything # before it. print; # then just print to STDOUT } } #### line1