perl doubt plz explain....

hi all

i wrote a shell script which uses perl script my code is :

>cat filename | while read i
>do
>perl -e 'require "/home/scripts/abc.pl" ; abc("$i")'
>done

perl script used will simply check syntax of Cobol programs but it didn't work for me so i asked my colleague he suggested following changes but i didn't get any can u explain me what exactly this mean

echo $i | perl -e 'require "/home/scripts/abc.pl" ; while (<STDIN>) {chomp $_  ; abc("$_");}'

what does $1 variable mean in perl ??

$1 would contain the first matched string in a regex. For example:

$str = "something here blah blah";
$str =~ m/e(.)e/;
print $1;

this regex would match ere and r would be captured in $1