On Wed, 13 Dec 2000, Alloun, Jonathan wrote:

> 
> Hello,
> 
> I need to search an array and chop it up based on finding a search pattern.
> 
> For example:
> 
> @a = "date=12.10.2000"
> 
> if (@a =~ /"date"/) {
>    print("\nFound date in @a!\n");
> }
> 
> But Perl does not find date enven though it is in the array????
> 
> What is the best way to search for a string and move just part of that
> string to another array (for use later)????
>

You don't assign a string (i.e. a scalar) to an array. You can either
assign it to another simple scalar variable or you assign it to an
element of an array, e.g. $a[0] = "date=12.10.2000";

**** [EMAIL PROTECTED] <Carl Jolley>
**** All opinions are my own and not necessarily those of my employer ****

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to