use strict; use warnings; (my $file = shift) or die "No file specified.\n"; my $dir = $ENV{'USER_PATH'} || "."; # Use current directory if USER_PATH not set my $path = "$dir/$file"; # Construct full pathname