PetaMem has asked for the wisdom of the Perl Monks concerning the following question:
Well ... I mean: both return a list no?
So while it is perfect to write
why can't we (me and Perl) be friends onmy $foo = (stat($file))[3];
Update: I didn't test exactly the code above, but embedded the sort-index within a print (see my post below). That throws a syntax error (which I still don't understand why). The code above works.my $lf = (sort(<*>))[-1];
Bye
PetaMem All Perl: MT, NLP, NLU
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What's the difference between stat and sort?
by beable (Friar) on Jul 15, 2004 at 09:57 UTC | |
by PetaMem (Priest) on Jul 15, 2004 at 10:03 UTC | |
by Chady (Priest) on Jul 15, 2004 at 10:12 UTC | |
by beable (Friar) on Jul 15, 2004 at 10:17 UTC | |
|
Re: What's the difference between stat and sort?
by BrowserUk (Patriarch) on Jul 15, 2004 at 10:15 UTC | |
by beable (Friar) on Jul 15, 2004 at 10:35 UTC | |
by BrowserUk (Patriarch) on Jul 15, 2004 at 10:55 UTC | |
|
Re: What's the difference between stat and sort?
by Tomte (Priest) on Jul 15, 2004 at 10:00 UTC | |
|
Re: What's the difference between stat and sort?
by Anonymous Monk on Jul 15, 2004 at 10:05 UTC |