All, 

I was playing with my code and after re-reading perdoc perlre, I still do 
not understand the items in yellow and their need.

here is my code.

open(F,"$ARGV[0]") || die "dick face: $!\n";
$i=0;
print "-w '";
#print $i;
while (<F>) {
chomp($_); 
        if ($i > 0) {
                print " or ";
        } 
        $i++; 
print "barcode=\"$_\" ";
}
print "\'\n";


I will start from the bottom up:

Why do I need or what is the significance of  print "\ ' \n";  I really do 
not need the first \ !

At line print barcode it seems that  do need the \ "$_\" "; as when I take 
the \'s away I get these errors which I am not understanding:

Scalar found where operator expected at parse_for_ejects.pl line 11, near 
""barcode="$_"
        (Missing operator before $_?)
String found where operator expected at parse_for_ejects.pl line 11, near 
"$_" ""
        (Missing operator before " "?)
syntax error at parse_for_ejects.pl line 11, near ""barcode="$_"
parse_for_ejects.pl had compilation errors.

help in explaining.

thanks, 

derek

Derek B. Smith
Ohiohealth IT
UNIX, EDM, TSMSupport

Reply via email to