in reply to Writing current working directory to $variable

use Cwd; my $dir = getcwd;
system() only returns the status code. you can use backticks (`) if you want the output:
my $dir = `pwd`;
ps. read merlyn's comment below.

-- ar0n || Just Another Perl Joe

Replies are listed 'Best First'.
RE: Re: Writing current working directory to $variable
by merlyn (Sage) on Aug 27, 2000 at 07:23 UTC
RE: Re: Writing current working directory to $variable
by Limo (Scribe) on Aug 27, 2000 at 03:27 UTC
    this returns: Use of uninitialized value at get-filename.date.pl line 21.
      never mind.....typo....my bad! Thanks!