Not really. -n tries to open the value of $type as a file.
By the way, won't you have a problem if $file_name or $type contains shell metacharacters?
In reply to Re^3: Comandline arguements when perl code is getting executed from command line
by ikegami
in thread Comandline arguements when perl code is getting executed from command line
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |