http://www.perlmonks.org?node_id=943668


in reply to Re^2: Module for accessing samba smbclient command
in thread Module for accessing samba smbclient command

my @printers = $VAR1 =~ /^(\S+)/mg;

See Matching in list context in perlop.