in reply to required explicit package error.
Such formatting makes code easier to read and guarantees a quicker response. It also guarantees that elements wrapped in <> won't be interpreted as HTML and ignored (which happened to the <STDIN> in your orginal post). For more information, check out the Site How To.!/usr/local/bin/perl print "Input file name: "; chomp ($infilename = <STDIN>); use strict; while ( defined($currentLine = <STDIN>) ) { if ($currentLine =~ /^ $name:/) { print $currentLine; } } close(IN); close(OUT);
Welcome to the Monastery!
Cheers, Curtis
|
|---|