Hi monks im trying to get the file names in a directory ..but its getting repeated again and again..Pls rectify
foreach $file (<*.*>) { if($file =~ /\.c/) { $filename = $file; print m"$filename\n"; } }
In reply to Loop Break by stallion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |