Re: Strip email attachments using IMAP.

2009-04-18 Thread Chas. Owens
On Sat, Apr 18, 2009 at 06:26, Meghanand Acharekar wrote: > Hi, > > Is it possible to strip email attachments from a remote IMAP folders & save > or download  them on local system (system on which script is running) > > I written a simple script using perl IMAPClient whic

RE: Strip email attachments using IMAP.

2009-04-18 Thread Jeff Pang
Could use Net::POP3 to fetch the whole message, then use MIME::Lite(::*) to parse it and get the attachment (given the case you know something about rfc822). regards. > Original Message > Subject: Strip email attachments using IMAP. > From: Meghanand Acharekar &g

Strip email attachments using IMAP.

2009-04-18 Thread Meghanand Acharekar
Hi, Is it possible to strip email attachments from a remote IMAP folders & save or download them on local system (system on which script is running) I written a simple script using perl IMAPClient which connects IMAP server and read emails from there, but found no method to strip attachm

Re: Strip HTML from files in a directory

2008-11-12 Thread Chas. Owens
On Wed, Nov 12, 2008 at 15:44, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Tue, Nov 11, 2008 at 17:17, bdy <[EMAIL PROTECTED]> wrote: > snip >> Sorry, I should have mentioned I was an ultra-beginner. Aside from >> using that in a .pl file, how else could I execute that for multiple >> files in a di

Re: Strip HTML from files in a directory

2008-11-12 Thread Chas. Owens
On Tue, Nov 11, 2008 at 17:17, bdy <[EMAIL PROTECTED]> wrote: snip > Sorry, I should have mentioned I was an ultra-beginner. Aside from > using that in a .pl file, how else could I execute that for multiple > files in a directory? snip #!/usr/bin/perl use strict; use warnings; use HTML::TreeBuil

Re: Strip HTML from files in a directory

2008-11-12 Thread bdy
On Oct 29, 10:57 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > bdy wrote: > > > Does anyone know if there's a way to use an HTMLstripperin Perl to > > scrub the HTML from all files in a specified directory? If so, would > > you point me in the correct direction. > > I would recommend something like >

Re: Strip HTML from files in a directory

2008-10-29 Thread Rob Dixon
bdy wrote: > > Does anyone know if there's a way to use an HTML stripper in Perl to > scrub the HTML from all files in a specified directory? If so, would > you point me in the correct direction. I would recommend something like use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new_from_c

RE: Strip HTML from files in a directory

2008-10-29 Thread Stewart Anderson
> -Original Message- > From: bdy [mailto:[EMAIL PROTECTED] > Sent: 29 October 2008 15:14 > To: beginners@perl.org > Subject: Strip HTML from files in a directory > > Does anyone know if there's a way to use an HTML stripper in Perl to > scrub the HTML

Strip HTML from files in a directory

2008-10-29 Thread bdy
Does anyone know if there's a way to use an HTML stripper in Perl to scrub the HTML from all files in a specified directory? If so, would you point me in the correct direction. Thanks, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.p

Re: Howto strip html from a $calar with HTML::Parser

2007-08-03 Thread Alan C
Thanks for the replies. I've added them to my searchable data. My forgetfullness worsens as I get older. I'd totally forgotten that I'd once done this with HTML::Strip And I began reinventing the wheel the other day. Lynx too, forgot about that (Slackware 12.0 right now). An

Re: Howto strip html from a $calar with HTML::Parser

2007-08-03 Thread Mumia W.
On 08/03/2007 03:30 AM, Alan C wrote: [...] I do not need to print to STDOUT Is the print @ line in the sub doing this? [...] Yes. Why not append the text to $string instead of printing the text? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Howto strip html from a $calar with HTML::Parser

2007-08-03 Thread Alan C
Hi, I saw the doc for HTML::Parser. I looked at its hstrip program in the eg folder but dunno how to strip a scalar instead of a file. I can strip a file. But I want to strip a scalar. Any help appreciated. As my code is currently, when ran, it prints text to STDOUT and the $source scalar

Re: manipulate strings to strip the beginning part

2006-07-17 Thread Rob Dixon
Nishi Bhonsle wrote: > > I want to manipulate strings containing filenames that have the following > format > Web\SiA\web\..\..\ etc > Web\SiAData\web\app\..\..\ etc > to remove everything in the begining of web part of the above strings and > store the rest of the part ie > web\..\..\ into a new

manipulate strings to strip the beginning part

2006-07-16 Thread Nishi Bhonsle
Hi: I want to manipulate strings containing filenames that have the following format Web\SiA\web\..\..\ etc Web\SiAData\web\app\..\..\ etc to remove everything in the begining of web part of the above strings and store the rest of the part ie web\..\..\ into a new string. Thereafter I will refere

Re: strip

2006-07-15 Thread Dr.Ruud
"WCJ d/b/a http://ccsh.us/"; schreef: > Rob Dixon: >> John W. Krahn: >>> s/_.*\././; >> >> Sometimes Perl regexes start to look like ASCII art! > > Thats why this format would be easier on the eyes: > > s|_.*\.|.|; Variants: s| _ .* [.] |.|x s! _ .* [.] !.!x s{ _ .* [.] }{.}x -- Affijn

Re: strip

2006-07-15 Thread WCJ d/b/a http://ccsh.us/
On 7/14/06, Rob Dixon <[EMAIL PROTECTED]> wrote: John W. Krahn wrote: > > s/_.*\././; Sometimes Perl regexes start to look like ASCII art! Thats why this format would be easier on the eyes: s|_.*\.|.|; -- WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/ -- To unsubscribe, e

Re: strip

2006-07-15 Thread Dr.Ruud
Rob Dixon schreef: > John W. Krahn: >> s/_.*\././; > > Sometimes Perl regexes start to look like ASCII art! It is a BRE, so far older than Perl. :) -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: strip

2006-07-14 Thread Rob Dixon
John W. Krahn wrote: s/_.*\././; Sometimes Perl regexes start to look like ASCII art! Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: strip

2006-07-14 Thread John W. Krahn
Nishi Bhonsle wrote: > Hi: Hello, > I have a filenames such as NQSname_l_cs.txt, NQSname_l_da.txt, > NQSname_l_zh- > tw.txt etc. > I would like to modify these filenames such that they are NQSname.txt > > What regex i could use to modify these filenames? s/_.*\././; John -- use Perl; program

RE: strip

2006-07-14 Thread Timothy Johnson
Here's one way to do it: # if($file =~ /^NQSname.+\.txt$/){ rename ($file,'NQSname.txt'); } # -Original Message- From: Nishi Bhonsle [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 5:29 PM To: beginners perl Subject: strip Hi: I have a fi

strip

2006-07-14 Thread Nishi Bhonsle
Hi: I have a filenames such as NQSname_l_cs.txt, NQSname_l_da.txt, NQSname_l_zh- tw.txt etc. I would like to modify these filenames such that they are NQSname.txt What regex i could use to modify these filenames? Thanks much.

Re: [SPAM DETECT] New lines are not removed using HTML::Strip::Whitespace module

2005-12-13 Thread Chris Devers
On Tue, 13 Dec 2005, Durai raj wrote: > Thanks for the reply. Is there any other perl modules or tools > available to remove the white space in HTML and JavaScript pages? Hang on -- why do you want to remove white space? To make serving content faster & consume less bandwidth? If so, you might

Re: [SPAM DETECT] New lines are not removed using HTML::Strip::Whitespace module

2005-12-13 Thread Xavier Noria
On Dec 13, 2005, at 10:41, Durai raj wrote: Hi, Thanks for the reply. Is there any other perl modules or tools available to remove the white space in HTML and JavaScript pages? Try HTML::Clean maybe. However, note that the docs say whitespaceRemove excess whitespace ...

Re: [SPAM DETECT] New lines are not removed using HTML::Strip::Whitespace module

2005-12-13 Thread Durai raj
from HTML pages using > HTML::Strip::Whitespace module. It removes the white space, but not > NEW LINES. > Here is my script: > > ==== > use HTML::Strip::Whitespace qw(html_strip_whitespace); > my $html = q { > > &

Re: [SPAM DETECT] New lines are not removed using HTML::Strip::Whitespace module

2005-12-13 Thread Xavier Noria
On Dec 13, 2005, at 5:59, Durai raj wrote: I tried to remove white space and newlines from HTML pages using HTML::Strip::Whitespace module. It removes the white space, but not NEW LINES. Here is my script: use HTML::Strip::Whitespace qw

New lines are not removed using HTML::Strip::Whitespace module

2005-12-12 Thread Durai raj
Hi All, I tried to remove white space and newlines from HTML pages using HTML::Strip::Whitespace module. It removes the white space, but not NEW LINES. Here is my script: use HTML::Strip::Whitespace qw(html_strip_whitespace); my $html = q

Re: Reading in external file, strip out duplicates, sort then save as ext. file

2005-09-21 Thread John W. Krahn
macromedia wrote: > Hi, Hello, > I have a file that I would like to read in then do the following: > > - Read in each line and remove any duplicate text with tags > - Sort the file so all tag IDs are in sequential order > - Save the results to a different file name. > > Can this be done easily?

re: Reading in external file, strip out duplicates, sort then save as ext. file

2005-09-21 Thread Chris Devers
On Wed, 21 Sep 2005, macromedia wrote: > I have a file that I would like to read in then do the following: > > - Read in each line and remove any duplicate text with tags > - Sort the file so all tag IDs are in sequential order > - Save the results to a different file name. > > Can this be done

re: Reading in external file, strip out duplicates, sort then save as ext. file

2005-09-21 Thread macromedia
Hi, I have a file that I would like to read in then do the following: - Read in each line and remove any duplicate text with tags - Sort the file so all tag IDs are in sequential order - Save the results to a different file name. Can this be done easily? If so, how? I'm really a newbie at this

re: Reading in external file, strip out duplicates, sort then save as ext. file

2005-09-21 Thread macromedia
Hi, I have a file that I would like to read in then do the following: - Read in each line and remove any duplicate text with tags - Sort the file so all tag IDs are in sequential order - Save the results to a different file name. Can this be done easily? If so, how? I'm really a newbie at this

Strip special characters

2005-07-13 Thread David Foley
<>

Re: Request for regex: Strip last dash in a record

2005-02-15 Thread Ken Simon
[EMAIL PROTECTED] wrote: If you just want to remove the last occuring '-' character, then the following would work. s/(.*)-(.*)/$1$2/; Well, huh. That does work. Though it reminds me only of how little I understand why. Thanks, you've made it look easy. His regex works because perl uses greedy

Re: Request for regex: Strip last dash in a record

2005-02-15 Thread Peter_Farrar
> >If you just want to remove the last occuring '-' character, then the >following would work. > >s/(.*)-(.*)/$1$2/; Well, huh. That does work. Though it reminds me only of how little I understand why. Thanks, you've made it look easy. ** CONFIDENTIALITY NOTICE ** NOTICE: This e-m

Re: Request for regex: Strip last dash in a record

2005-02-15 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi All, Hello, The code below does what I want to do, but it takes 3 lines and a temporary array (yuck). It does? Could you please explain what exactly you want to do? Just going by your subject line, this will work (assuming $_ contains the data.) s/(.*)-/$1/; I can't c

RE: Request for regex: Strip last dash in a record

2005-02-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: >> [EMAIL PROTECTED] wrote: >> >>> Hi All, >>> >>> The code below does what I want to do, but it takes 3 lines and a >>> temporary array (yuck). I can't come up with a one line regex >>> substitution. Anyone got one? >>> >>> my $tmp = reverse split //, $_; >>> $tmp =~

Re: Request for regex: Strip last dash in a record

2005-02-15 Thread Ankur Gupta
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi All, The code below does what I want to do, but it takes 3 lines and a temporary array (yuck). I can't come up with a one line regex substitution. Anyone got one? my $tmp = reverse split //, $_; $tmp =~ s/-//; $_ = rever

Re: Request for regex: Strip last dash in a record

2005-02-15 Thread Peter_Farrar
>[EMAIL PROTECTED] wrote: > >>Hi All, >> >>The code below does what I want to do, but it takes 3 lines and a temporary >>array (yuck). I can't come up with a one line regex substitution. Anyone >>got one? >> >>my $tmp = reverse split //, $_; >>$tmp =~ s/-//; >>$_ = reverse split //, $tmp; > >can

Request for regex: Strip last dash in a record

2005-02-15 Thread Peter_Farrar
Hi All, The code below does what I want to do, but it takes 3 lines and a temporary array (yuck). I can't come up with a one line regex substitution. Anyone got one? my $tmp = reverse split //, $_; $tmp =~ s/-//; $_ = reverse split //, $tmp; TIA, Peter ** CONFIDENTIALITY NOTICE ** N

RE: FW: HTML Strip and tag?

2004-05-06 Thread Boris Shor
Wiggins, Thanks for writing back. > -Original Message- > From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 06, 2004 2:48 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: FW: HTML Strip and tag? > > > > Hello, > >

Re: FW: HTML Strip and tag?

2004-05-06 Thread Wiggins d Anconia
> Hello, > > I am using the HTML::Strip module to strip the HTML tags off of source > files, which I need to process. But it seems that anything after a tag > is ignored. > > For example, in the file > > http://www.legis.state.ia.us/GA/76GA/Session.2/SJournal/

FW: HTML Strip and tag?

2004-05-06 Thread Boris Shor
Hello, I am using the HTML::Strip module to strip the HTML tags off of source files, which I need to process. But it seems that anything after a tag is ignored. For example, in the file http://www.legis.state.ia.us/GA/76GA/Session.2/SJournal/Day/0228.html the vast majority of the text is

Re: Trying to strip HTML tags

2002-10-16 Thread Jenda Krynicky
From: Graig Warner <[EMAIL PROTECTED]> > I have a CGI script that tries to remove the tags from a string that > represents the content of an HTML file. > > There are a number of tags that I would like to keep intact, and I > represent them in the following array: > > @INCLUDE_T

Trying to strip HTML tags

2002-10-16 Thread Graig Warner
Hi all, I have a CGI script that tries to remove the tags from a string that represents the content of an HTML file. There are a number of tags that I would like to keep intact, and I represent them in the following array: @INCLUDE_TAGS = ( "I", "BR", "SUP", "FONT", "P" ); However, some of the

Re: HTML::Parse & strip the html

2002-06-25 Thread Felix Geerinckx
on Tue, 25 Jun 2002 06:18:34 GMT, [EMAIL PROTECTED] (Alan C.) wrote: > And there's plenty of html tables in the source code here which > all it has for output is a bunch of "TABLES NOT SHOWN" just like > that in caps. > > With this latter url, how do I make it ju

HTML::Parse & strip the html

2002-06-24 Thread Alan C.
ml tables in that url's source code. But substitute the above url with this next url http://iwin.nws.noaa.gov/iwin/ca/hourly.html And there's plenty of html tables in the source code here which all it has for output is a bunch of "TABLES NOT SHOWN" just like that in caps. With

Re: Strip Characters from a particular field

2002-06-08 Thread David T-G
Fred -- Would you please fix your addressing from <> so that replies will work properly? ...and then Fred Sahakian said... % % Hi Folks, Hello! % % $value =~tr/+/ /; will remove the "+" from all the form fields and replace it with a space, how can I ask the program to remove the "+" fro

Re: Strip html from filehandle? >was win command console exe how perl launch & capture its STDOUT?

2002-05-31 Thread Felix Geerinckx
t"; > #end-- > But it pulls all content, including the html, from that url and > writes to file. > > Can strip all html before writes to file? If so, how? I don't want/need graburl.exe - used LWP::Simple instead (no need to fork). A quick look at the sour

Strip html from filehandle? >was win command console exe how perl launch & capture its STDOUT?

2002-05-30 Thread Alan C.
t MYWTHR "$output"; #end-- (graburl.exe) www.google.com for graburl But it pulls all content, including the html, from that url and writes to file. Can strip all html before writes to file? If so, how? I just want only the text info content in my file. Thanks. Alan. -- To unsu

Re: Strip $ from variable

2002-04-15 Thread drieux
In case no one has mentioned it, there are good reasons for using '-w' and "use strict;" in your perl code On Monday, April 15, 2002, at 05:16 , Daniel Falkenberg wrote: [..] > $string = "$20.90"; > > $string =~ s/$//; <-- I figured this would work fine? [..] if you had used '-w' and strict

Re: Strip $ from variable

2002-04-15 Thread Jeff 'japhy' Pinyan
On Apr 15, Daniel Falkenberg said: >I was just wondering how I would go about stripping the $ sign from the >following string? > >$string = "$20.90"; That won't do what you expect -- $string is probably ".90" now. $20 is a variable (set by a regex) and is probably undef. You need either '$20.9

RE: Strip $ from variable

2002-04-15 Thread Mark Anderson
You need to escape the $ in the regex: $string =~ s/\$//; -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 5:16 PM To: [EMAIL PROTECTED] Subject: Strip $ from variable Hello All, I was just wondering how I would go about stripping the

Strip $ from variable

2002-04-15 Thread Daniel Falkenberg
Hello All, I was just wondering how I would go about stripping the $ sign from the following string? $string = "$20.90"; $string =~ s/$//; <-- I figured this would work fine? Any ideas? Regards, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

Re: Strip Carriage Returns

2002-04-04 Thread Kevin Hancock
Cure: Make this script on linux box, call it strip-dos, and run it make it executable first ~#chmod 700 strip-dos ~#./strip-dos file-name Creates a file called file-name.stripped so it doesn't mess with the origional. The magic is in the last line, if you want to type command each time

Re: Strip Carriage Returns

2002-04-04 Thread Chas Owens
: > > Illegal character \015 (carriage return) at index.pl line 2. > (Maybe you didn't strip carriage returns after a network transfer?) > > Is there a simple way to prevent/cure this? > > Glenn perl -ine 's/\015//g;print' filename or use dos2unix or d2u or f

Re: Strip Carriage Returns

2002-04-04 Thread Elaine -HFB- Ashton
Glenn Cannon [[EMAIL PROTECTED]] quoth: *> *>Illegal character \015 (carriage return) at index.pl line 2. *>(Maybe you didn't strip carriage returns after a network transfer?) *> *>Is there a simple way to prevent/cure this? Several. Most modern Unixes have 'dos2unix&

RE: Strip Carriage Returns

2002-04-04 Thread John Edwards
help http://www.google.com/search?sourceid=navclient&q=Maybe+you+didn%27t+strip+c arriage+returns+after+a+network+transfer%3F John -Original Message- From: Glenn Cannon [mailto:[EMAIL PROTECTED]] Sent: 04 April 2002 15:06 To: [EMAIL PROTECTED] Subject: Strip Carriage Returns Not s

Strip Carriage Returns

2002-04-04 Thread Glenn Cannon
didn't strip carriage returns after a network transfer?) Is there a simple way to prevent/cure this? Glenn

Re: strip first space

2002-03-01 Thread Elaine -HFB- Ashton
[EMAIL PROTECTED] [[EMAIL PROTECTED]] quoth: *> *>$string =~ s/^\s+//; Removes leading whitespaces *> *>$string =~ s/^\s+//g; /g (GLOBALLY) is redundant in the *>case of "leading whitespages" For a beginner, it's a not a critical detail. e. -- To unsubscribe,

RE: strip first space

2002-03-01 Thread Jason Larson
> If I have a string and the first character is a space, > may not always be a space. > Example: John > Tommy > Beth > > John and Beth have a space, Tommy does not. > How do I strip that. I do not want to use the global > command becau

Re: strip first space

2002-03-01 Thread William.Ampeh
$string =~ s/^\s+//; Removes leading whitespaces $string =~ s/^\s+//g; /g (GLOBALLY) is redundant in the case of "leading whitespages" See PERL Cookbook page 30 for the answer to your question. __ William Ampeh (x3939) Federal Reserve Board

Re: strip first space

2002-03-01 Thread Elaine -HFB- Ashton
Tanton Gibbs [[EMAIL PROTECTED]] quoth: *> *>The regular expression *>s/^\s//; s/^\s+//g; would be even better as it would remove all whitspace at the beginning of a line and it would replace all matches to the pattern instead of just the first it finds. e. -- To unsubscribe, e-mail: [EMAIL P

Re: strip first space

2002-03-01 Thread Tanton Gibbs
the beginning of the string \s # one space character ( space, tab, or newline ) / # and replace it with / #nothing ; - Original Message - From: "Susan Aurand" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 01, 2002 1:08

strip first space

2002-03-01 Thread Susan Aurand
If I have a string and the first character is a space, may not always be a space. Example: John Tommy Beth John and Beth have a space, Tommy does not. How do I strip that. I do not want to use the global command because a want the space between First and Last name

RE: perl code question;How to make script strip out lines in read onl y, Leaving search criteria

2001-12-06 Thread Wagner-David
CTED]]Sent: Thursday, December 06, 2001 15:12To: '[EMAIL PROTECTED]'Subject: perl code question;How to make script strip out lines in read onl y, Leaving search criteria Subject:[How to make script strip out lines in read only, Leaving search criteria   #!/usr/bin/p

perl code question;How to make script strip out lines in read only, Leaving search criteria

2001-12-06 Thread Binkley Robert - rbinkl
Title: Nature Subject:[How to make script strip out lines in read only, Leaving search criteria   #!/usr/bin/perl$filename=$ARGV[0];   # File name to be read must be created todayopen(FILENAME,"<$filename");@search=("Task Completed", "Job rep

Re: Strip charactes from every element in array

2001-08-23 Thread Luke Bakken
a void context - big no-no :-) I personally liked the s/// for @array expression. On Thu, 23 Aug 2001, John Edwards wrote: > Is there any easy way to strip a single character from every element in an > array? > > @array = qw(one1 two1 three1); > > And I need the elements to be

RE: Strip charactes from every element in array

2001-08-23 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
August 23, 2001 4:49 PM | To: 'HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)' | Subject: RE: Strip charactes from every element in array | | | and if the character isn't there | | @array(one1 two three1); | | I end up with | | one tw three | | -Original Message- |

RE: Strip charactes from every element in array

2001-08-23 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
| Is there any easy way to strip a single character from every | element in an | array? @array = qw(one1 two1 three1); chop @array; print "@array"; Hope this helps. -- Marcus | -Original Message- | From: John Edwards [mailto:[EMAIL PROTECTED]] | Sent: Thursday, August 23,

Strip charactes from every element in array

2001-08-23 Thread John Edwards
Is there any easy way to strip a single character from every element in an array? @array = qw(one1 two1 three1); And I need the elements to be (one two three). My only idea is copy to another array, run a foreach, s/// the char out and push into another array, then after the foreach has