#!/usr/bin/perl my $SP4binconfig = "/etc/SPECdaemons.list"; open (my $fh, '<', $SP4binconfig) or die "cant open the file : $!"; my @SPECores = <$fh>; close $fh; print "@SPECores"; #### #!/usr/bin/perl my $SP4binconfig = "/etc/SPECdaemons.list"; if (-e $SP4binconfig) { open (my $fh, '<', $SP4binconfig) or die "cant open the file : $!"; my @SPECores = <$fh>; close $fh; } else { print "mmmmm"; } print "@SPECores";