That is the 'flattening list' problem.  We can't do this:

MySubRoutine( @List, $Scalar1, $Scalar2 ):

sub MySubRoutine {
    my (@List, $Scalar1, $Scalar2 ) = @_;
    # The list variable contains all of @_
    # the scalars don't get passed as expected
}

So a list parameter shouldn't have any other parameter following (unless
it's a list referrence).

In the task below, this might be helpful:

@quote = split ( /\|/, $array );
for my $quote ( @quote ) {
    Win32::MsgBox( $quote, 1, $Title );
}

Regards,
Tony



                                                                                       
                                                    
                    "Mike Singleton" <[EMAIL PROTECTED]>                              
                                                    
                    Sent by:                                   To:     
<[EMAIL PROTECTED]>                         
                    [EMAIL PROTECTED]      cc:                     
                                                    
                    eState.com                                 Subject:     RE: 
Question - Win32::MsgBox                                   
                                                                                       
                                                    
                                                                                       
                                                    
                                                                                       
                                                    
                    12/10/01 10:31 AM                                                  
                                                    
                                                                                       
                                                    
                                                                                       
                                                    



I have question.... in this script... why did I have to place the [0] in
the $quote?? (last line...)



use Win32;

$Title = "Message Of The Day";

$File = "moti.txt";

$Message = "Message of the Day";

#print "Content-type: text\n\n";

open (QUOTEFILE, "<$File") || die print "Could not open quote file";

@line=<QUOTEFILE>;

close (QUOTEFILE);

srand;

$array = $line[int rand(@line)];

@quote = split (/\|/, $array);

Win32::MsgBox($quote[0], 1, $Title);





===

Mike Singleton CCNA, CNE, MCSE

Network Analyst

(253) 272-1916  x1259

(253) 405-1968 (cellular)

[EMAIL PROTECTED]



DaVita Inc.



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




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

Reply via email to