2023-02-26 00:01:58

This commit is contained in:
2023-02-26 00:01:58 +09:00
parent c137e4b768
commit a1b7f62196
5 changed files with 42 additions and 0 deletions

1
README.md Normal file
View File

@@ -0,0 +1 @@
# Perl Examples

33
launch Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/perl
use strict;
use lib "/media/elex/UltraFit/Scripts/my-scripts/perl/modules";
use MyTime;
my $doc = <<DOC;
launch <option>
* git - add, commit, push
* mod - chmod a+x *.pl
DOC
sub git {
my $now = &MyTime::ymdhms;
system("git add -A");
system("git commit -m '$now'");
system("git push -u origin");
}
sub chmod{
system("chmod a+x *src/*.pl");
}
my $argc = $#ARGV + 1;
my $argv1 = @ARGV[0];
if ($argv1 eq "git"){
&git;
} elsif ($argv1 eq "mod") {
&chmod;
} else {
print $doc;
}

8
src/glob.pl Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/perl
use strict;
chdir("/home/elex/") or die("$!");
my @files = glob("*");
for (@files){
print "$_\n";
}