in reply to find a string into an interval
#!/usr/bin/perl -w $s1 = 'exp1'; $s2 = 'exp2'; open(FICH, "a.txt"); while (<FICH>) { if ($_ =~ /$s1(.*?)$s2/) { print "$1\n"; } } close FICH; [download]