Skip to content

Instantly share code, notes, and snippets.

@yao2030
Created September 18, 2013 03:43
Show Gist options
  • Save yao2030/6604275 to your computer and use it in GitHub Desktop.
Save yao2030/6604275 to your computer and use it in GitHub Desktop.
programming perl
#!/usr/bin/perl
use strict;
print "Looking for my files that are both writable and executable\n";
die "No file specified\n" unless @ARGV;
my @myfile;
foreach my $file (@ARGV)
{
print "$file is my file and writable and executable\n" if -o -r -w $file;
push @myfile, $file;
}
die("No files") unless @ARGV;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment