in reply to Problem with <STDIN>
foreach ( grep( /^.*\.xml$/, readdir(DIR) ) ) { print "Pls enter Section level value for $_ : "; chop( $seclev = <STDIN> ); { local $/; open( FIN, "<$_" ) or die("$_ is not opened\n"); .. } } [download]