use warnings; use strict; open(PS,"ping localhost|") || die "Failed: $!\n"; while ( ) { #-- do something here } #### use warnings; use strict; open (my $file, '>', 'output.txt') or die "Could not open file: $!"; my $output = `example.exe`; die "$!" if $?; print $file $output; #### use Learning::Perl; use Beginning::Perl::Ovid; print "Awesome Books";