For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > December 2006 > Perl list









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Perl list
shulamitm

2006-12-17, 7:59 am

Hi,

1. How can I remove all the files with .rql suffix from a list?
2. What is the best way to check if a list is empty?

thanks.

Paul Lalli

2006-12-17, 7:59 am

shulamitm wrote:

> 1. How can I remove all the files with .rql suffix from a list?


my @no_rql = grep { ! /\.rql$/ } @all_files;

> 2. What is the best way to check if a list is empty?


if (!@list) { ... }

Paul Lalli

shulamitm

2006-12-17, 7:59 am


Paul Lalli wrote:
> shulamitm wrote:
>
>
> my @no_rql = grep { ! /\.rql$/ } @all_files;
>
>
> if (!@list) { ... }
>
> Paul Lalli



Thank you very much!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com