[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Perl tips



On Mon, Nov 25, 2002 at 02:52:42PM +0000, Steve Tickle wrote:
> Apologies for this since it's not strictly a Linux problem but I'm trying 
> to do what I hoped was the relatively simple task of listing the contents 
> of a directory in alphabetical order using a perl script.

    system("ls");

or

    print "$_\n" for sort <*>;

or

    opendir D, '.' or die "can't read directory '.': $!\n";
    print "$_\n" for sort readdir(D);
    closedir D;

or

    etc etc

> If one of you perl wizards is willing to help me, it might be better to 
> take it off list and I'll explain my problem and exactly what it is I'm 
> trying to do.


Feel free to reply to me in private.


-- 
"But Sidley Park is already a picture, and a most amiable picture too.
The slopes are green and gentle. The trees are companionably grouped at
intervals that show them to advantage. The rill is a serpentine ribbon
unwound from the lake peaceably contained by meadows on which the right
amount of sheep are tastefully arranged." Lady Croom - Arcadia
___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.