How to handle jpegs inside Net::NNTP

F

fishfry

I can fetch a message ok with Net::NNTP, but if it contains a jpeg, I
can't see how to properly save the image data to make a jpg readable by
Photoshop. Any pointers appreciated.
 
U

usenet

Abigail wrote:
[after cutline]
$; # A lone dollar?
=$"; # Pod?
$; # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print%; # No right operand for %?

I kept staring at that and saying, NO WAY WILL THAT JAPH COMPILE. And
damned if it doesn't. I still have no idea how. Now I gotta go figure
it out...
 
D

Dr.Ruud

Michele Dondi schreef:
usenet:

Granted, *any* of Abigail's japhs is awesome almost by definition.
But... we both know perl is free form: if you just remove a pair of
newlines and think that $; and %; are variable names like any other,
then it's not that obscure any more, althouth not less brilliant and
fascinating!

$; = $";
$;{Just=>another=>Perl=>Hacker=>} = $/;
print %; ;

Somehow I liked most the superfluous '=>' after Hacker.

With -MO=Deparse:

$; = $";
$;{join $;, 'Just', 'another', 'Perl', 'Hacker'} = $/;
print %;
 
C

Ch Lamprecht

Michele Dondi wrote:

Abigails code:
if you just remove a pair of
newlines and think that $; and %; are variable names like any other, they are not.
then it's not that obscure any more, althouth not less brilliant and
fascinating!

$; = $";
$;{Just=>another=>Perl=>Hacker=>} = $/;
print %; ;

Could anybody explain, why perl will execute the code above under 'use strict'
whereas it will not do so, when %; is replaced by %foo like so:

use strict;
use warnings;
$; # A lone dollar?
=$"; # Pod?
$foo # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print %foo ; # No right operand for %?


I can't find a special variable %; in the docs.

Christoph
 
C

Ch Lamprecht

Ch said:
Michele Dondi wrote:

Abigails code:


they are not.



Could anybody explain, why perl will execute the code above under 'use
strict'
whereas it will not do so, when %; is replaced by %foo like so:

use strict;
use warnings;
$; # A lone dollar?
=$"; # Pod?
$foo # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print %foo ; # No right operand for %?

sorry, I missed this (from perlvar):

Perl identifiers that begin with digits, control characters, or punctuation
characters are exempt from the effects of the package declaration and are always
forced to be in package main; they are also exempt from strict 'vars' errors.

Christoph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top