if Subject: John 1234567890, Then i need to print 1234567890 use Mail::POP3Client; $pop = new Mail::POP3Client( USER => "xxxxxxxxxxxxxxxxx", PASSWORD => "xxxxxxxxxx", HOST => "xxxxxxxxxx" ); for ($i = 1; $i <= $pop->Count(); $i++) { foreach ( $pop->Head( $i ) ) { /^(From|Subject):\s+/i and print $_, "\n"; } print "\n"; sleep 5; } [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1176262038.155405.71070@y80g2000hsf.googlegroups.com> [ref] => [htmlstate] => on_nl2br [postusername] => eng.john84@gmail.com [ip] => eng.john84@gmai [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> if Subject: John 1234567890, Then i need to print 1234567890 >[/ref] I don't understand - there is usually *no* number associated with the Subject. At least that's the way it is for me when I run the script you provided. Typical output is: ---------- From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= Subject: Decimal arithmetic ---------- The only time I see numbers is when the person writing the email has included numeric character(s) in the subject. eg: ---------- From: "pl" Subject: [Mingw-users] mingw with g++ 4.x ---------- Cheers, Rob [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <461c5a73$0$28625$afc38c87@news.optusnet.com.au> [ref] => <1176262038.155405.71070@y80g2000hsf.googlegroups.com> [htmlstate] => on_nl2br [postusername] => Sisyphus [ip] => sisyphus1@nomai [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> if Subject: John 1234567890, Then i need to print 1234567890 >[/ref] I don't understand - there is usually *no* number associated with the Subject. At least that's the way it is for me when I run the script you provided. Typical output is: ---------- From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= Subject: Decimal arithmetic ---------- The only time I see numbers is when the person writing the email has included numeric character(s) in the subject. eg: ---------- From: "pl" Subject: [Mingw-users] mingw with g++ 4.x ---------- Cheers, Rob [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <461c5b44$0$16555$afc38c87@news.optusnet.com.au> [ref] => <1176262038.155405.71070@y80g2000hsf.googlegroups.com> [htmlstate] => on_nl2br [postusername] => Sisyphus [ip] => sisyphus1@nomai [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> if Subject: John 1234567890, Then i need to print 1234567890[/ref] > > I don't understand - there is usually *no* number associated with the > Subject. At least that's the way it is for me when I run the script you > provided. Typical output is: > > ---------- > From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= > Subject: Decimal arithmetic > ---------- > > The only time I see numbers is when the person writing the email has > included numeric character(s) in the subject. eg: > > ---------- > From: "pl" > Subject: [Mingw-users] mingw with g++ 4.x > ---------- > > Cheers, > Rob[/ref] Maybe you want the Message-ID: use Mail::POP3Client; $pop = new Mail::POP3Client( USER => "xxxxxxxxxxxxxxxxx", PASSWORD => "xxxxxxxxxx", HOST => "xxxxxxxxxx" ); for ($i = 1; $i <= $pop->Count(); $i++) { foreach ( $pop->Head( $i ) ) { /^(Message-ID):\s+/i && print $_, "\n"; } print "\n"; sleep 5; } [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1176428858.368050.204140@y80g2000hsf.googlegroups.com> [ref] => <1176262038.155405.71070@y80g2000hsf.googlegroups.com><461c5b44$0$16555$afc38c87@news.optusnet.com.au> [htmlstate] => on_nl2br [postusername] => odhiseo [ip] => julises@gmail.c [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> if Subject: John 1234567890, Then i need to print 1234567890[/ref][/ref] >[ref] > > I don't understand - there is usually *no* number associated with the > > Subject. At least that's the way it is for me when I run the script you > > provided. Typical output is:[/ref] >[ref] > > ---------- > > From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= > > Subject: Decimal arithmetic > > ----------[/ref] >[ref] > > The only time I see numbers is when the person writing the email has > > included numeric character(s) in the subject. eg:[/ref] >[ref] > > ---------- > > From: "pl" > > Subject: [Mingw-users] mingw with g++ 4.x > > ----------[/ref] >[ref] > > Cheers, > > Rob[/ref] > > Maybe you want the Message-ID: > > use Mail::POP3Client; > > $pop = new Mail::POP3Client( USER => "xxxxxxxxxxxxxxxxx", > PASSWORD => "xxxxxxxxxx", > HOST => "xxxxxxxxxx" ); > > for ($i = 1; $i <= $pop->Count(); $i++) { > foreach ( $pop->Head( $i ) ) { > /^(Message-ID):\s+/i && print $_, "\n"; > } > print "\n"; > sleep 5; > }[/ref] Sorry, now I understood your question use Mail::POP3Client; $pop = new Mail::POP3Client( USER => "xxxxxxxxxxxxxxxxx", PASSWORD => "xxxxxxxxxx", HOST => "xxxxxxxxxx" ); for ($i = 1; $i <= $pop->Count(); $i++) { foreach ( $pop->Head( $i ) ) { /^Subject:\.+\s(\d+)/i && print $1, "\n"; } print "\n"; sleep 5; } [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1176429332.577876.218330@b75g2000hsg.googlegroups.com> [ref] => <1176262038.155405.71070@y80g2000hsf.googlegroups.com><461c5b44$0$16555$afc38c87@news.optusnet.com.au><1176428858.368050.204140@y80g2000hsf.googlegroups.com> [htmlstate] => on_nl2br [postusername] => odhiseo [ip] => julises@gmail.c [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Print Subject without characters Just Numbers using POP3Client. Please Help - PERL Modules

Print Subject without characters Just Numbers using POP3Client. Please Help - PERL Modules

I`m using POP3Client, I don`t need to print all subject i need to print just number. i.e --> if Subject: John 1234567890, Then i need to print 1234567890 use Mail::POP3Client; $pop = new Mail::POP3Client( USER => "xx", PASSWORD => "x", HOST => "x" ); for ($i = 1; $i <= $pop->Count(); $i++) { foreach ( $pop->Head( $i ) ) { /^(From|Subject):\s+/i and print $_, "\n"; } print "\n"; sleep 5; }...

  1. #1

    Default Print Subject without characters Just Numbers using POP3Client. Please Help

    I`m using POP3Client,
    I don`t need to print all subject i need to print just number.
    i.e --> if Subject: John 1234567890, Then i need to print 1234567890


    use Mail::POP3Client;


    $pop = new Mail::POP3Client( USER => "xx",
    PASSWORD => "x",
    HOST => "x" );

    for ($i = 1; $i <= $pop->Count(); $i++) {
    foreach ( $pop->Head( $i ) ) {
    /^(From|Subject):\s+/i and print $_, "\n";
    }
    print "\n";
    sleep 5;
    }

    eng.john84@gmail.com Guest

  2. #2

    Default Re: Print Subject without characters Just Numbers using POP3Client. Please Help


    <com> wrote in message
    news:googlegroups.com... 

    I don't understand - there is usually *no* number associated with the
    Subject. At least that's the way it is for me when I run the script you
    provided. Typical output is:

    ----------
    From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= <net>
    Subject: Decimal arithmetic
    ----------

    The only time I see numbers is when the person writing the email has
    included numeric character(s) in the subject. eg:

    ----------
    From: "pl" <pl>
    Subject: [Mingw-users] mingw with g++ 4.x
    ----------

    Cheers,
    Rob

    Sisyphus Guest

  3. #3

    Default Re: Print Subject without characters Just Numbers using POP3Client. Please Help


    <com> wrote in message
    news:googlegroups.com... 

    I don't understand - there is usually *no* number associated with the
    Subject. At least that's the way it is for me when I run the script you
    provided. Typical output is:

    ----------
    From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= <net>
    Subject: Decimal arithmetic
    ----------

    The only time I see numbers is when the person writing the email has
    included numeric character(s) in the subject. eg:

    ----------
    From: "pl" <pl>
    Subject: [Mingw-users] mingw with g++ 4.x
    ----------

    Cheers,
    Rob

    Sisyphus Guest

  4. #4

    Default Re: Print Subject without characters Just Numbers using POP3Client. Please Help

    On Apr 10, 10:51 pm, "Sisyphus" <afraid.org> wrote: 
    >
    > I don't understand - there is usually *no* number associated with the
    > Subject. At least that's the way it is for me when I run the script you
    > provided. Typical output is:
    >
    > ----------
    > From: =?ISO-8859-1?Q?D=E9cio_Luiz_Gazzoni_Filho?= <net>
    > Subject: Decimal arithmetic
    > ----------
    >
    > The only time I see numbers is when the person writing the email has
    > included numeric character(s) in the subject. eg:
    >
    > ----------
    > From: "pl" <pl>
    > Subject: [Mingw-users] mingw with g++ 4.x
    > ----------
    >
    > Cheers,
    > Rob[/ref]


    Maybe you want the Message-ID:

    use Mail::POP3Client;

    $pop = new Mail::POP3Client( USER => "xx",
    PASSWORD => "x",
    HOST => "x" );

    for ($i = 1; $i <= $pop->Count(); $i++) {
    foreach ( $pop->Head( $i ) ) {
    /^(Message-ID):\s+/i && print $_, "\n";
    }
    print "\n";
    sleep 5;
    }

    odhiseo Guest

  5. #5

    Default Re: Print Subject without characters Just Numbers using POP3Client. Please Help

    On Apr 12, 8:47 pm, "odhiseo" <com> wrote: 

    > [/ref]





    >
    > Maybe you want the Message-ID:
    >
    > use Mail::POP3Client;
    >
    > $pop = new Mail::POP3Client( USER => "xx",
    > PASSWORD => "x",
    > HOST => "x" );
    >
    > for ($i = 1; $i <= $pop->Count(); $i++) {
    > foreach ( $pop->Head( $i ) ) {
    > /^(Message-ID):\s+/i && print $_, "\n";
    > }
    > print "\n";
    > sleep 5;
    > }[/ref]

    Sorry, now I understood your question

    use Mail::POP3Client;

    $pop = new Mail::POP3Client( USER => "xx",
    PASSWORD => "x",
    HOST => "x" );

    for ($i = 1; $i <= $pop->Count(); $i++) {
    foreach ( $pop->Head( $i ) ) {
    /^Subject:\.+\s(\d+)/i && print $1, "\n";
    }
    print "\n";
    sleep 5;
    }

    odhiseo Guest

  6. #6

    Default Re: Print Subject without characters Just Numbers using POP3Client. Please Help

     
     

    Here is another way to do It (TMTOWTDI)


    use Mail::POP3Client;

    my $n = 10; #Length of number string in the subject


    $pop = new Mail::POP3Client( USER => "xx",
    PASSWORD => "x",
    HOST => "x" );

    for ($i = 1; $i <= $pop->Count(); $i++) {
    foreach ( $pop->Head( $i ) ) {

    next unless /^Subject:/;
    /\s(\d{$n})(\s|$)/;
    print $1;
    }
    print "\n";
    sleep 5;
    }

    And in the previous reply I had a little error, you must change:
    /^Subject:\.+\s(\d+)/i && print $1, "\n";
    for:
    /^Subject:.+\s(\d+)/i && print $1, "\n";


    odhiseo Guest

Similar Threads

  1. When You print the doent after you use the stamp: numbers show why?
    By Brock_C_Rice@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 3
    Last Post: October 20th, 05:17 PM
  2. First line in body of Mail::POP3Client
    By eng.john84@gmail.com in forum PERL Modules
    Replies: 2
    Last Post: March 23rd, 04:42 PM
  3. how to print forms with serial numbers?
    By brandon_ho@adobeforums.com in forum Adobe Indesign Windows
    Replies: 8
    Last Post: August 6th, 06:39 PM
  4. print the first 20 characters of a string
    By Ricki Susic in forum PHP Development
    Replies: 5
    Last Post: August 28th, 03:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •