IllustratorPackageのWindows版をPerlで作成中
Revision | 3769dccd6df825666871edeab997d7f8b8067284 (tree) |
---|---|
Time | 2012-10-10 17:36:22 |
Author | ![]() |
Commiter | macneko_ayu |
1file modified. 1file maked.
@@ -15,9 +15,10 @@ my $errcount = 0; | ||
15 | 15 | |
16 | 16 | #ファイルを引数で受け取り繰り返し処理させるメインルーチン |
17 | 17 | sub main { |
18 | - foreach $file (@_) { | |
19 | - push(@linkfilepath, $file); | |
18 | + foreach my $targetfile (@_) { | |
19 | + push(@linkfilepath, $targetfile); | |
20 | 20 | } |
21 | + return @linkfilepath; | |
21 | 22 | } |
22 | 23 | |
23 | 24 | main(@ARGV); |
\ No newline at end of file |
@@ -0,0 +1,12 @@ | ||
1 | +use strict; | |
2 | +use warnings; | |
3 | +use utf8; | |
4 | + | |
5 | +sub openfile { | |
6 | + my $targetfile = $_[0]; | |
7 | + open my $fh, '<', $targetfile | |
8 | + or die "Can't open $targetfile: $!"; | |
9 | + return $fh; | |
10 | +} | |
11 | + | |
12 | +openfile($ARGV[0]); | |
\ No newline at end of file |