I’m new to perl. I invented a project for myself. I wanted to download and process a show I’m watching off a news server but I’ve hit a snag I can’t seem to get past.
use News::NNTPClient;
$c = new News::NNTPClient("news.easynews.com");
$c->authinfo("****","****");
($first, $last) = ($c->group("alt.binaries.tv.big-brother"));
@ARRAY = $c->xpat("", $first, $last, qw(*Big.Brother.UK.S08.D003d.*));
foreach (@ARRAY) {
@FIELDS = split;
foreach (@FIELDS) {
$FIELDS[13] =~ s/\"//g;
open OUTPUT, ">>bbuk/$FIELDS[13]";
print OUTPUT $c->body($FIELDS[0]);
close OUTPUT;
print "\n\n*********** $FIELDS[0]", $c->message, "\n";
}
}
I'm getting error like this:
*********** 6536628
News::NNTPClient garbled response: =ybegin part=1 line=128 size=9752 name=Big.Br
other.UK.S08.D003d.Big.Mouth.XviD.PDTV.
MJL.par2
*********** 6536628
News::NNTPClient garbled response: =ypart begin=1 end=9752
*********** 6536628
News::NNTPClient garbled response: zk|\*zu~Γ*******╟εáN╕░X°╛u┌╦⌂wJ°.Æîóæ@█ì≡µE¶┬
Öz zk|J\XZ*pôûÅnÅ¥ì▒φp▬♫K♠~Wzéqü¿5╔6├↔ú8ε♦▀Dï▄=}♣⌐>├µ▌&╡HL╚┼╫ÿz┤ZæíñΩ♂♫****
*lôæXl£Ö
I’m using activestate perl version 5.6.1 on a windows box. Any advice?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.