On 11/27/07, lerameur <[EMAIL PROTECTED]> wrote:
> works good now:
> my $file_to_print = ( `ls -1c /test/*log | tail -1 `);
>
> print "file_to_print: $file_to_print";
Since you didn't chomp() it, and since you didn't need to add a
newline when you printed it, it seems that $file_
On Tuesday 27 November 2007 08:18, lerameur wrote:
>
> works good now:
> my $file_to_print = ( `ls -1c /test/*log | tail -1 `);
>
> print "file_to_print: $file_to_print";
>
> open (FILE, "< /test/$file_to_print") or die "Could not open
> file_to_print $: $!";
>
> although the thi
works good now:
my $file_to_print = ( `ls -1c /test/*log | tail -1 `);
print "file_to_print: $file_to_print";
open (FILE, "< /test/$file_to_print") or die "Could not open
file_to_print $: $!";
although the third line is not opening the file. It prints out good
but but I
To: beginners@perl.org
From: lerameur <[EMAIL PROTECTED]>
Subject: error on simple system command
Date sent: Mon, 26 Nov 2007 13:05:53 -0800 (PST)
Organization: http://groups.google.com
> Hello,
>
> I a
On Monday 26 November 2007 13:05, lerameur wrote:
> Hello,
Hello,
> I am trying to use this two line script. The command by itself works,
> when I run this script, I get error message:
> Use of uninitialized value in concatenation (.) or string at ./
> find_date.pl line 8.
>
> line 8: my $file_t
Hello,
I am trying to use this two line script. The command by itself works,
when I run this script, I get error message:
Use of uninitialized value in concatenation (.) or string at ./
find_date.pl line 8.
line 8: my $file_to_print = system "ls -lrt /test/*log | tail -1 |
awk {'print $9'}";