in reply to how to get the current folder name where the program is running?
#!/usr/local/bin/perl -w use strict; use File::Spec::Functions qw/ splitdir rel2abs /; my $parent_dir = (splitdir(rel2abs($0)))[-2]; print "$parent_dir\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: how to get the current folder name where the program is running?
by exussum0 (Vicar) on Dec 13, 2003 at 13:01 UTC | |
by tachyon (Chancellor) on Dec 13, 2003 at 14:00 UTC | |
by exussum0 (Vicar) on Dec 13, 2003 at 16:41 UTC | |
|
Re: Re: how to get the current folder name where the program is running?
by Anonymous Monk on Dec 13, 2003 at 20:43 UTC |