in reply to array check help
#!/usr/bin/perl -w use strict; my @array = qw( Bob Carol Mike Katie ); if( @array ) { print "\@array is not empty!\n"; } else { print "\@array is empty!\n"; }
#!/usr/bin/perl -w use strict; my @array = qw( Bob Carol Mike Katie ); # Delete the contents of the array. @array = (); if( @array ) { print "\@array is not empty!\n"; } else { print "\@array is empty!\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: array check help
by Limbic~Region (Chancellor) on May 16, 2003 at 20:29 UTC |