#! /usr/bin/perl use strict; use warnings; use FileHandle; my $file; if (-e $ARGV[0]){ $file = $ARGV[0]; hostreport(); } else { die; } sub hostreport { open(my $fh, "){ print if (/^\/); } } print $file;