paullem has asked for the wisdom of the Perl Monks concerning the following question:
I am using the Filesys::SmbClientParser module in my program. It is working well with one exception...
I am getting this sprinkled liberally in my output:
What incantation might I chant to exorcise this demon? I have consulted all of the sacred scrolls (Google) to no avail!Domain=[XXX] OS=[SpinStream2] Server=[Windows 2000 Lan Manager]
SOLUTION: Thanks to monk: your_mother
And the list of files flow freely without the demonic curses.#!/usr/bin/perl -w use Filesys::SmbClientParser; use Capture::Tiny ':all'; my $smb = new Filesys::SmbClientParser; $smb->Debug(0); $smb->Workgroup('mydomain'); $smb->User('myid'); $smb->Password('mypwd'); $smb->Host('myhost'); $smb->Share('mysharename'); # List content $stderr = capture_stderr { $smb->cd('to/som/directory') or die("cd failed failed: $smb->err, +$!");; }; #<-note the closing ; my @l; $stderr = capture_stderr { @l = $smb->dir or die("List failed failed: $smb->err, $!"); }; #<-note the closing ; foreach (@l) {print $_->{name},"\n";}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Suppress unwanted text from Filesys::SmbClientParser
by Your Mother (Archbishop) on Nov 22, 2017 at 04:40 UTC | |
by paullem (Sexton) on Nov 22, 2017 at 20:29 UTC | |
by glasswalk3r (Friar) on Nov 23, 2017 at 13:34 UTC | |
|
Re: Suppress unwanted text from Filesys::SmbClientParser
by LanX (Saint) on Nov 22, 2017 at 02:18 UTC | |
by paullem (Sexton) on Nov 22, 2017 at 20:01 UTC | |
|
Re: Suppress unwanted text from Filesys::SmbClientParser
by 1nickt (Canon) on Nov 22, 2017 at 00:09 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |