[EMAIL PROTECTED] writes:
 > >  > print @mapped;
 > >  >         $dialog=$top->Dialog(-title=>"Fertig", -text=>"Die
 > >  > Laufwerke\n".@mapped."\nwurden erfolgreich
 > >  > angebunden",-buttons=>[qw/Ok/])->Show;
 > 
 > > That's because the second use evaluates @mapped in a scalar context,
 > > which returns the number of entries. You probably want to interpolate
 > > the array directly in the string (see doco on variable $") or use
 > > join.
 > 
 > ok, replacing "@mapped" with "join($",@mapped)" worked, but I still don't
 > understand why the array would get evaluated in a scalar context?

The concatenation operator supplies the context. Many operators supply
a scalar context, e.g

   @a = "Hello Sailor;
   $, = ' ';
   print @a;            # prints Hello Sailor
   print @a + 1;        # prints 3
   print @a . 1;        # prints 21

... but not all ...

   print @a , 1;        # prints Hello Sailor 1

BTW your join statement is equivalent to interpolating the array in a
string, so

$dialog=$top->Dialog(-title=>"Fertig", -text=>"Die Laufwerke\n@mapped\nwurden 
erfolgreich angebunden",-buttons=>[qw/Ok/])->Show;

should look the same.

HTH

-- 
Brian Raven
Perhaps you should compile your Perl with long doubles one of these
megaseconds.
             -- Larry Wall in <[EMAIL PROTECTED]>


-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely 
for the intended addressee(s). Unauthorised reproduction, disclosure, 
modification, and/or distribution of this email may be unlawful. If you 
have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message 
do not necessarily reflect those of 
LIFFE Holdings Plc or any of its subsidiary companies.
-----------------------------------------------------------------------

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to