diff options
-rwxr-xr-x | localmarkdown2sms | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/localmarkdown2sms b/localmarkdown2sms index 3e42e05..54e3cc9 100755 --- a/localmarkdown2sms +++ b/localmarkdown2sms @@ -21,6 +21,7 @@ use strict; +use File::Spec; use File::Slurp; use Time::Duration::Parse; #use Proc::Daemon; @@ -35,7 +36,7 @@ my ($path) = shift @ARGV; foreach my $file (read_dir( $path )) { my ($key, $i); next unless ($file =~ /\.mdwn$/); - foreach my $line (read_file( '$path/' . $file )) { + foreach my $line (read_file( File::Spec->catfile($path, $file))) { chomp $line; my $content; # headline |