How to handle jpegs inside Net::NNTP

Discussion in 'Perl Misc' started by fishfry, Sep 5, 2006.

  1. fishfry

    fishfry Guest

    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.
     
    fishfry, Sep 5, 2006
    #1
    1. Advertising

  2. fishfry

    Guest

    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...

    --
    David Filmer (http://DavidFilmer.com)
     
    , Sep 5, 2006
    #2
    1. Advertising

  3. fishfry

    Dr.Ruud Guest

    Michele Dondi schreef:
    > usenet:
    >> Abigail:


    >>> $; # 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...

    >
    > 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 %;

    --
    Affijn, Ruud

    "Gewoon is een tijger."
     
    Dr.Ruud, Sep 5, 2006
    #3
  4. fishfry

    Ch Lamprecht Guest

    Michele Dondi wrote:

    Abigails code:

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


    > 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

    --

    perl -e "print scalar reverse q//"
     
    Ch Lamprecht, Sep 5, 2006
    #4
  5. fishfry

    Ch Lamprecht Guest

    Ch Lamprecht wrote:
    > Michele Dondi wrote:
    >
    > Abigails code:
    >
    >>>> $; # A lone dollar?
    >>>> =$"; # Pod?
    >>>> $; # The return of the lone dollar?
    >>>> {Just=>another=>Perl=>Hacker=>} # Bare block?
    >>>> =$/; # More pod?
    >>>> print%; # No right operand for %?

    >
    >
    >> 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 %?
    >
    >


    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
    --

    perl -e "print scalar reverse q//"
     
    Ch Lamprecht, Sep 5, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Henry

    created jpegs

    Brian Henry, Jul 21, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    422
    Brian Henry
    Jul 21, 2003
  2. MU
    Replies:
    4
    Views:
    1,796
    Martin Honnen
    Apr 1, 2009
  3. Anton Bangratz
    Replies:
    0
    Views:
    183
    Anton Bangratz
    Jun 4, 2008
  4. Replies:
    7
    Views:
    406
    Dr.Ruud
    Aug 9, 2006
  5. sadie-no-reply

    Posting to nntp newsgroup with Perl (Net::NNTP)

    sadie-no-reply, Mar 4, 2007, in forum: Perl Misc
    Replies:
    3
    Views:
    308
    Jamie
    Mar 5, 2007
Loading...

Share This Page