Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Module for accessing samba smbclient command

by quester (Vicar)
on Dec 14, 2011 at 06:41 UTC ( #943485=note: print w/ replies, xml ) Need Help??


in reply to Module for accessing samba smbclient command

I don't see a CPAN module offhand, but you might consider a simple-minded approach. What happens if you try

my $output = qx{smbclient -L}; say $output;


Comment on Re: Module for accessing samba smbclient command
Download Code
Replies are listed 'Best First'.
Re^2: Module for accessing samba smbclient command
by Anonymous Monk on Dec 14, 2011 at 13:19 UTC
    Thank you. I've got the results in a variable. Here is how it prints with DataDumper:
    $VAR1 = 'Printer1 Printer Printer 1 Printer2 Printer Printer 2 Store Printer Store printer ';
    How can I create an array containing just the printer names (col 1)?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2015-08-01 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls