filter for a search on ldap

2013-01-25 Thread samuel desseaux
Hi! My question can be easy but i want to have some opinions before making some changes. the soft i use, when i connect it to my ldap for importing users, use the uid as the userid. But, as our ldap is supann, we would like to use the supannaliaslogin. So, my goal is to add a filter on the

Re: How to filter out { } block in text file

2010-11-17 Thread Vincent Li
On Wed, Nov 17, 2010 at 3:26 AM, Rob Dixon wrote: > On 16/11/2010 17:01, Vincent Li wrote: >> >> Hi List, >> >> I have a text test.txt file looks like below: >> >> stp instance 0 { >>    interfaces 1.1 { >>          external path cost 2 >>          internal path cost 2 >>       } >>    vla

Re: How to filter out { } block in text file

2010-11-17 Thread Vincent Li
On Wed, Nov 17, 2010 at 3:26 AM, Rob Dixon wrote: > On 16/11/2010 17:01, Vincent Li wrote: >> >> Hi List, >> >> I have a text test.txt file looks like below: >> >> stp instance 0 { >>    interfaces 1.1 { >>          external path cost 2 >>          internal path cost 2 >>       } >>    vla

Re: How to filter out { } block in text file

2010-11-17 Thread Rob Dixon
On 16/11/2010 17:01, Vincent Li wrote: Hi List, I have a text test.txt file looks like below: stp instance 0 { interfaces 1.1 { external path cost 2 internal path cost 2 } vlans { internal vlan10 } } profile http http_global { def

Re: How to filter out { } block in text file

2010-11-16 Thread C.DeRykus
On Nov 16, 1:54 pm, vincent.mc...@gmail.com (Vincent Li) wrote: > On Tue, Nov 16, 2010 at 1:11 PM, Shawn H Corey wrote: > > > On 10-11-16 04:07 PM, Vincent Li wrote: > > >> My aim is to remove specific profile.*{} block from that file > > > Yes, but if the {} blocks are nestable, then you can't do

Re: How to filter out { } block in text file

2010-11-16 Thread Brian Fraser
Assuming your brackets are balanced, here's a drop-in regex for you: /$profile .*? ( #Group 1 { (?: [^{}]+ | (?1) #If not brackets, eat up. Otherwise, recurse on group 1. )*? } ) /gx; Minimally adapted from Anon.'s

Re: How to filter out { } block in text file

2010-11-16 Thread Jim Gibson
On 11/16/10 Tue Nov 16, 2010 2:25 PM, "Vincent Li" scribbled: > On Tue, Nov 16, 2010 at 2:14 PM, Jim Gibson wrote: >> On 11/16/10 Tue  Nov 16, 2010  1:07 PM, "Vincent Li" >> scribbled: >> >>> On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote: >> You need a parser to do this righ

Re: How to filter out { } block in text file

2010-11-16 Thread Vincent Li
On Tue, Nov 16, 2010 at 2:14 PM, Jim Gibson wrote: > On 11/16/10 Tue  Nov 16, 2010  1:07 PM, "Vincent Li" > scribbled: > >> On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote: > >>> >>> You need a parser to do this right. You might have some luck by reading the >>> entire file into a scalar varia

Re: How to filter out { } block in text file

2010-11-16 Thread Jim Gibson
On 11/16/10 Tue Nov 16, 2010 1:07 PM, "Vincent Li" scribbled: > On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote: >> >> You need a parser to do this right. You might have some luck by reading the >> entire file into a scalar variable and using the Text::Balanced module >> together with some

Re: How to filter out { } block in text file

2010-11-16 Thread Vincent Li
On Tue, Nov 16, 2010 at 1:11 PM, Shawn H Corey wrote: > On 10-11-16 04:07 PM, Vincent Li wrote: >> >> My aim is to remove specific profile.*{} block from that file > > Yes, but if the {} blocks are nestable, then you can't do it with regular > expressions alone. > right, I only have one level nes

Re: How to filter out { } block in text file

2010-11-16 Thread Shawn H Corey
On 10-11-16 04:07 PM, Vincent Li wrote: My aim is to remove specific profile.*{} block from that file Yes, but if the {} blocks are nestable, then you can't do it with regular expressions alone. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization

Re: How to filter out { } block in text file

2010-11-16 Thread Vincent Li
On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote: > On 11/16/10 Tue  Nov 16, 2010  9:01 AM, "Vincent Li" > scribbled: > >> Hi List, >> >> I have a text test.txt file looks like below: >> >> stp instance 0 { >>    interfaces 1.1 { >>          external path cost 2 >>          internal path cos

Re: How to filter out { } block in text file

2010-11-16 Thread Jim Gibson
On 11/16/10 Tue Nov 16, 2010 9:01 AM, "Vincent Li" scribbled: > Hi List, > > I have a text test.txt file looks like below: > > stp instance 0 { >interfaces 1.1 { > external path cost 2 > internal path cost 2 > } >vlans { > internal > vlan10

Re: How to filter out { } block in text file

2010-11-16 Thread Shawn H Corey
On 10-11-16 12:01 PM, Vincent Li wrote: how can I find a specific profile { } block and remove/replace that part from the file You will need a Finite-State Automation (FSA) with a push-down stack. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization

How to filter out { } block in text file

2010-11-16 Thread Vincent Li
Hi List, I have a text test.txt file looks like below: stp instance 0 { interfaces 1.1 { external path cost 2 internal path cost 2 } vlans { internal vlan10 } } profile http http_global { defaults from http max header size 38912 encryp

Re: Email Filter Script

2010-10-24 Thread Jim Gibson
At 5:11 PM -0400 10/24/10, Mark wrote: Thank you, Brendon, for taking a look at the script. I'd like to narrow down the problem so I can finish some working version of this thing. I have logic that gets the job of restoring the e-mail done, albeit using regex in a brute force kind of way rath

Re: Email Filter Script

2010-10-24 Thread Mark
Thank you, Brendon, for taking a look at the script. I'd like to narrow down the problem so I can finish some working version of this thing. I have logic that gets the job of restoring the e-mail done, albeit using regex in a brute force kind of way rather than parsing the message elegantly wi

Re: Email Filter Script

2010-10-23 Thread Brandon McCaig
I give up. My head hurts. D: -- Brandon McCaig V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://lea

Re: Email Filter Script

2010-10-23 Thread Brandon McCaig
On Fri, Oct 22, 2010 at 3:52 PM, wrote: > Brendon - > > Did you get the following e-mail (with the attachment intact) at your gmail > address? I'm resending it to the list with the attachment snipped, because > apparently this list has a 50k limit. Yes I did. :) It just kept going and going. :P

Re: Email Filter Script

2010-10-23 Thread HerrPoetry
all 2010.pdf Content-Disposition: attachment; filename="Writing Center Fall 2010.pdf" {SNIPPED, because of this list's file size limit of 50k} --_=_NextPart_001_01CB6012.B007C0A4-- = END SAMPLE E-MAIL ===== = BEGIN MY ORIGINAL TEST SCRIPT = #!/usr/bin/env perl use

Re: Email Filter Script

2010-10-22 Thread Brandon McCaig
Hello, Mark. On Fri, Oct 22, 2010 at 3:35 AM, Mark wrote: > I've been trying (and failing) to write a script that takes a forwarded > e-mail that has been altered in the forwarding process, restores that > e-mail, and then delivers the restored version to me by e-mail. I've never > programmed in

Re: Email Filter Script

2010-10-22 Thread Mark
On 10/22/10 6:29 AM, Peter Scott wrote: I have multiple e-mail accounts and use one IMAP > e-mail client (Tbird) to manage them all; can't be chasing down > individual webmail accounts. However, the college Outlook account in > question is not accessible via IMAP. So I set up the Outlook accou

Re: Email Filter Script

2010-10-22 Thread Peter Scott
On Fri, 22 Oct 2010 03:35:19 -0400, Mark wrote: > I have a college e-mail account. The college uses Outlook webmail. > I hate Outlook webmail. You are among friends :) > I have multiple e-mail accounts and use one IMAP > e-mail client (Tbird) to manage them all; can't be chasing down > indiv

Email Filter Script

2010-10-22 Thread Mark
ient addresses from the header (both To: and Cc:) and replaces them with the forward-to address I provided in the forward rule. (By the way, there are no other filter rules possible; forwarding is my only option.) 3.Inserts "FW: " into the Subject header. 4.At the t

Re: Recursively filter an array

2010-09-03 Thread Dr.Ruud
On 2010-09-02 21:15, Chas. Owens wrote: my $string = do { open my $fh, "<", "filename" or die $!; local $/; <$fh>; }; To make it use less memory, write it like this: my $string; { open my $fh, "<", "filename" or die $!; local $/; $string = <$fh>; }; -- Ruud -- To unsubs

Re: Recursively filter an array

2010-09-02 Thread Uri Guttman
> "CO" == Chas Owens writes: CO> You may think there is more code in the while loop version, but really CO> it there is less. File::Slurp is a pure Perl module. That means that CO> whatever loop it is using to get the data must happen in Perl. Then CO> you copy that data to an arra

Re: Recursively filter an array

2010-09-02 Thread Chas. Owens
On Thu, Sep 2, 2010 at 13:08, Uri Guttman wrote: snip > for the excluded hash, it is simpler and probably much faster than line > by line. the latter way needs to run much more perl code which is slower > than a single slice. i won't benchmark it because it is also better > coding which is more im

Re: Recursively filter an array

2010-09-02 Thread Uri Guttman
> "CO" == Chas Owens writes: CO> On Thu, Sep 2, 2010 at 04:39, Uri Guttman wrote: CO> snip >> if you want speed, that is not the best way to read in the file >> lines. File::Slurp (on cpan) can do that for you and is cleaner as well: CO> snip CO> If there was one thing I could c

Re: Recursively filter an array

2010-09-02 Thread Chas. Owens
On Thu, Sep 2, 2010 at 04:39, Uri Guttman wrote: snip > if you want speed, that is not the best way to read in the file > lines. File::Slurp (on cpan) can do that for you and is cleaner as well: snip If there was one thing I could change about this list, it would be that to ban people from saying

Re: Recursively filter an array

2010-09-02 Thread Shlomi Fish
Hi Stuart, a few comments on your code. On Wednesday 01 September 2010 21:18:10 Kryten wrote: > Wow. Thank you Shlomi, Thank you Chas and Thank you Shawn. > > Hash sets seem to be the way to go here. Much quickness too! > > Here is what I have ( the least I can do is give you all a chance to >

Re: Recursively filter an array

2010-09-02 Thread Uri Guttman
> "K" == Kryten writes: K> Here is what I have ( the least I can do is give you all a chance to K> laugh K> at my code! ):- here comes the laughter! :) K> #!/usr/bin/perl K> use warnings ; put use strict in there too. you are declaring some vars, strict enforces that you declar

Re: Recursively filter an array

2010-09-02 Thread Kryten
Wow. Thank you Shlomi, Thank you Chas and Thank you Shawn. Hash sets seem to be the way to go here. Much quickness too! Here is what I have ( the least I can do is give you all a chance to laugh at my code! ):- #!/usr/bin/perl use warnings ; my $names_file = 'C:\names.log' ; my $exclude_list =

Re: Recursively filter an array

2010-09-01 Thread Shawn H Corey
found in File B. Now, I have this working just fine in Windows Powershell, but it really slow, as I am foreaching file b into a where-object filter, it works but takes minutes to run. Based on my limited exposure to perl, I'm pretty certain that TMTOWTDI !! Many thanks, Stuart Load file B i

Re: Recursively filter an array

2010-09-01 Thread Chas. Owens
ike:- > > 63256 > 55223 > .. > > I need to (quickly as possible) remove all the lines from File A, > whose numbers can be found in File B. > > Now, I have this working just fine in Windows Powershell, but it > really slow, as I am foreaching file b into a where-object fi

Re: Recursively filter an array

2010-09-01 Thread Shlomi Fish
. > > File B looks like:- > > 63256 > 55223 > .. > > I need to (quickly as possible) remove all the lines from File A, > whose numbers can be found in File B. > > Now, I have this working just fine in Windows Powershell, but it > really slow, as I am f

Recursively filter an array

2010-09-01 Thread Kryten
rking just fine in Windows Powershell, but it really slow, as I am foreaching file b into a where-object filter, it works but takes minutes to run. Based on my limited exposure to perl, I'm pretty certain that TMTOWTDI !! Many thanks, Stuart I need to remove frok -- To unsubscribe, e-mail:

Mobile::Wurfl vs Apache2::WURFL Filter

2010-04-24 Thread Mimi Cafe
Hi, Has anyone experience using one of these modules? Unlike Mobile::Wurfl, I seems to me that Apache2::WURFL Filter will take all the work once configured? It that accurate or am I missing something in the short documentation I have read? Mimi

Re: filter script read STDIN from named pipe >file

2010-03-22 Thread Uri Guttman
> "KW" == Kenneth Wolcott writes: KW> On Mon, Mar 22, 2010 at 15:50, Uri Guttman wrote: >> "KW" == Kenneth Wolcott writes: KW>  >> select LOGNAME; KW>  >> $|++; KW>  >> select STDOUT; KW>  KW>   Which is what the Perl Cookbook suggests as well. you sai

Re: filter script read STDIN from named pipe >file

2010-03-22 Thread Kenneth Wolcott
Hi Uri; On Mon, Mar 22, 2010 at 15:50, Uri Guttman wrote: > > "KW" == Kenneth Wolcott writes: > > KW> Hi Harry; > KW> On Mon, Mar 22, 2010 at 12:25, Harry Putnam > wrote: > > >> Harry Putnam writes:But even then I still got > what I > >> needed... or until someone tells me > >> its

Re: filter script read STDIN from named pipe >file

2010-03-22 Thread Uri Guttman
> "KW" == Kenneth Wolcott writes: KW> Hi Harry; KW> On Mon, Mar 22, 2010 at 12:25, Harry Putnam wrote: >> Harry Putnam writes:But even then I still got what I >> needed... or until someone tells me >> its better to in this case not to use IO::Handle but stick with Jim >> Gs' su

Re: filter script read STDIN from named pipe >file

2010-03-22 Thread Kenneth Wolcott
Hi Harry; On Mon, Mar 22, 2010 at 12:25, Harry Putnam wrote: > Harry Putnam writes:But even then I still got what I > needed... or until someone tells me > its better to in this case not to use IO::Handle but stick with Jim > Gs' suggestion: > > select LOGNAME; > $|++; > select STDOUT; >

Re: filter script read STDIN from named pipe >file

2010-03-22 Thread Harry Putnam
Harry Putnam writes: > Thanks, that works fine. > > The page offered by perldoc -q flush mentions a write up about > buffering ( http://perl.plover.com/FAQs/Buffering.html ), that I also > went through. > > I'm sorry to say that it was mostly like trying to read ancient > sanskrit, since its writ

Re: filter script read STDIN from named pipe >file

2010-03-22 Thread Harry Putnam
Jim Gibson writes: linux expert wrote: >>> Try adding the following line after your 'use warnings' line: >>> $|++; >>> >>> That will disable output buffering on the currently-selected >>> filehandle (STDOUT be default). Harry replied: >>Doesn't appear to make any difference whatever. Jim G.

Re: filter script read STDIN from named pipe >file

2010-03-21 Thread Jim Gibson
At 7:40 PM -0500 3/21/10, Harry Putnam wrote: Linux Expert writes: Again... appears to work. However the log file takes quite a long time to starting showing any action, and then stay well behind the console output. Try adding the following line after your 'use warnings' line: $|++;

Re: filter script read STDIN from named pipe >file

2010-03-21 Thread Harry Putnam
27; line: > $|++; > > That will disable output buffering on the currently-selected > filehandle (STDOUT be default). Doesn't appear to make any difference whatever. using `logger' to write a dozen lines to syslog that the filter would grab like: logger "FAKE Temperature above

Re: filter script read STDIN from named pipe >file

2010-03-21 Thread Linux Expert
> Again... appears to work. > > However the log file takes quite a long time to starting showing any > action, and then stay well behind the console output. > Try adding the following line after your 'use warnings' line: $|++; That will disable output buffering on the currently-selected filehandl

filter script read STDIN from named pipe >file

2010-03-21 Thread Harry Putnam
pipe: On linux that is accomplished in syslog.conf or in my case rsyslog.conf like this: grep '|' /etc/rsyslog.conf *.*;mail.none;news.none |/var/adm/pipe Then the filter script just reads from that (named)pipe. ./sysfltr pipe It works fine, and as you'll see belo

Re: filter email

2006-05-05 Thread James Turnbull
Khairul Azmi wrote: > Hi, > I am a newbies and wondering if anyone could guide me how to do this > task. > It is fairly easy I guess for the expert. > a. Develop a program that would filter email file (in text) that > matching > with a keyword. The keyword should only exist

filter email

2006-05-05 Thread Khairul Azmi
Hi, I am a newbies and wondering if anyone could guide me how to do this task. It is fairly easy I guess for the expert. a. Develop a program that would filter email file (in text) that matching with a keyword. The keyword should only exists at the body part or the subject and not at the header

Re: can not filter out commentary lines with reg-exps

2006-03-29 Thread John W. Krahn
Harald wrote: > Hi, Hello, > I need to parse an ASCII file which first rows are comments. Those rows > are marked by a '#' at their beginning. You need to use '^' instead of '\' to indicate the beginning of a line. > I try to filter them out by > &

Re: can not filter out commentary lines with reg-exps

2006-03-29 Thread Bjørge Solli
On Wednesday 29 March 2006 14:22, Harald wrote: > I need to parse an ASCII file which first rows are comments. Those rows > are marked by a '#' at their beginning. > I try to filter them out by > > while( <$FH> =~ m{\#*} ) while( <$FH> =~ m{^\#.*} ) >

RE: can not filter out commentary lines with reg-exps

2006-03-29 Thread Raymond Raj
> -Original Message- > From: Harald [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 29, 2006 5:53 PM > To: beginners@perl.org > Subject: can not filter out commentary lines with reg-exps > > > Hi, > > I need to parse an ASCII file which first rows are

can not filter out commentary lines with reg-exps

2006-03-29 Thread Harald
Hi, I need to parse an ASCII file which first rows are comments. Those rows are marked by a '#' at their beginning. I try to filter them out by while( <$FH> =~ m{\#*} ) {} But this does not work. The loop does never stop. What goes wrong? I am really confused! Regards

Re: Filter Quotes

2006-03-05 Thread David Moreno Garza
On 18:30 Thu 02 Mar 2006, maillists wrote: > $Values->{text_field} =~ s/"/"/; Try adding a `g' on the end of the regexp: $Values->{text_field} =~ s/"/"/g; Cheers, -- David Moreno Garza <[EMAIL PROTECTED]> | http://www.damog.net/ <[EMAIL PROTECTED]> | GPG: C

Apllying filter on Data::Dumper not giving any output.

2006-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Took the original code from AS Doc: $Data::Dumper::Sortkeys = \&my_filter; my $foo = { map { (ord, "$_$_$_") } 'I'..'Q' }; my $bar = { %$foo }; my $baz = { reverse %$foo }; print Dumper [ $foo, $bar, $baz ]; sub my_filter { my ($hash) = @_; # return an

Re: Filter Quotes

2006-03-03 Thread Beau E. Cox
On Thursday 02 March 2006 13:30, maillists wrote: > Hi, > > I'm trying to filter quotes out of a web form and replace them with > " > > $Values->{text_field} =~ s/"/"/; > return; The above would replace the first " with " on the fi

Re: Filter Quotes

2006-03-02 Thread Chas Owens
On 3/2/06, maillists <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to filter quotes out of a web form and replace them with > " > > $Values->{text_field} =~ s/"/"/; > return; > > However, This does not seem to work. Is this

Filter Quotes

2006-03-02 Thread maillists
Hi, I'm trying to filter quotes out of a web form and replace them with " $Values->{text_field} =~ s/"/"/; return; However, This does not seem to work. Is this right? Also, I would like to replace the single quote ' Thanks Rick -- To unsubscribe, e

RE: filter

2005-11-13 Thread Charles K. Clarkson
Tom Allison <mailto:[EMAIL PROTECTED]> wrote: : I was at the YAPC::NA this year and saw someone using something : called : : FILTER{ : : } : : Or something like that in their code. I'm taking this from memory, : but I was not familiar with the statement, 'FILTER'. : :

Re: filter

2005-11-13 Thread Michael Glaesemann
On Nov 14, 2005, at 13:04 , Tom Allison wrote: I was at the YAPC::NA this year and saw someone using something called FILTER{ } Or something like that in their code. I'm taking this from memory, but I was not familiar with the statement, 'FILTER'. I wasn't there an

filter

2005-11-13 Thread Tom Allison
I was at the YAPC::NA this year and saw someone using something called FILTER{ } Or something like that in their code. I'm taking this from memory, but I was not familiar with the statement, 'FILTER'. Where does this come from? -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Writing a mail filter...

2005-10-14 Thread Jessica Rasku
I am wanting to write a mail filter which will allow me to use a score sheet and a configuration file to filter mail into specific folders. This would be accomplished in conjunction with procmail, and possibly formail. The program would have to take the message and scan it for certain paterns

Re: inline GREP filter...

2005-05-17 Thread John W. Krahn
David Gilden wrote: Hello, Hello, In the following I was thinking it would just print out: "Hello" #!/usr/bin/perl -w $S = "Hello, Perl!"; ($R) = grep {/\w+/} $S; grep() filters lists so if an element of the list on the right contains \w+ it will be passed through to the left but other elements wi

Re: inline GREP filter...

2005-05-17 Thread Philip M. Gollucci
David Gilden wrote: Hello, In the following I was thinking it would just print out: "Hello" #!/usr/bin/perl -w $S = "Hello, Perl!"; ($R) = grep {/\w+/} $S; print "$R\n"; I am trying for some sort of inline filtering so I can do the following: #!/usr/bin/perl -w use CGI qw/:standard/; use strict;

inline GREP filter...

2005-05-17 Thread David Gilden
Hello, In the following I was thinking it would just print out: "Hello" #!/usr/bin/perl -w $S = "Hello, Perl!"; ($R) = grep {/\w+/} $S; print "$R\n"; I am trying for some sort of inline filtering so I can do the following: #!/usr/bin/perl -w use CGI qw/:standard/; use strict; my $page =

RE: Filter Regular Expressions

2005-02-07 Thread Charles K. Clarkson
Gomez, Gonzalo <[EMAIL PROTECTED]> wrote: : How could i get or use this XML parser module ? There are many XML parser modules. They are kept on a network named CPAN. Follow this link to the CPAN FAQ. http://www.cpan.org/misc/cpan-faq.html#Where_find_Perl_modules : Thanks for your answer !

RE: Filter Regular Expressions

2005-02-07 Thread Gomez, Gonzalo
... Gonzalo Gómez -Mensaje original- De: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 07 de Febrero de 2005 11:52 a.m. Para: beginners@perl.org Asunto: RE: Filter Regular Expressions Gomez, Gonzalo <[EMAIL PROTECTED]> wrote: : Hi, I want to filter text using r

RE: Filter Regular Expressions

2005-02-07 Thread Charles K. Clarkson
Gomez, Gonzalo <[EMAIL PROTECTED]> wrote: : Hi, I want to filter text using regular expressions, but i : don't know how to find in a file a string like this , : or , or , Etc. I try to use the little : script bellow with a count for the word but this scrit : doesn't work if i

RE: Filter Regular Expressions

2005-02-07 Thread Gomez, Gonzalo
--- De: Ezra Taylor [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 07 de Febrero de 2005 11:19 a.m. Para: Gomez, Gonzalo CC: beginners@perl.org Asunto: Re: Filter Regular Expressions Gomez, Gonzalo wrote: >Hi, I want to filter text using regular expressions, but i don't know how to >find

Re: Filter Regular Expressions

2005-02-07 Thread Ezra Taylor
Gomez, Gonzalo wrote: Hi, I want to filter text using regular expressions, but i don't know how to find in a file a string like this , or , or , Etc. I try to use the little script bellow with a count for the word but this scrit doesn't work if i put symbols like / , \ , > ,

Filter Regular Expressions

2005-02-07 Thread Gomez, Gonzalo
Hi, I want to filter text using regular expressions, but i don't know how to find in a file a string like this , or , or , Etc. I try to use the little script bellow with a count for the word but this scrit doesn't work if i put symbols like / , \ , > , < (Reserved Symbo

Re: Program to read data from serial port, filter and process

2005-01-26 Thread John W. Krahn
Jason Balicki wrote: Charles K. Clarkson wrote: Repost your script to the previous web link and I'll take another look on Thursday. I will do that. In the meantime, I've implimented many of the suggestions everyone has given me, but I'm a bit stumped on this: I have t

RE: Program to read data from serial port, filter and process

2005-01-26 Thread Jason Balicki
Charles K. Clarkson wrote: > Repost your script to the previous web link and I'll take > another look on Thursday. I will do that. In the meantime, I've implimented many of the suggestions everyone has given me, but I'm a bit stumped on this: I have the function:

RE: Program to read data from serial port, filter and process

2005-01-25 Thread Charles K. Clarkson
Jason Balicki <[EMAIL PROTECTED]> wrote: : if you've got any helpful tips though... :) Coping with Scoping: http://perl.plover.com/FAQs/Namespaces.html Repost your script to the previous web link and I'll take another look on Thursday. HTH, Charles K. Clarkson -- Mobile Homes Specialist 2

RE: Program to read data from serial port, filter and process

2005-01-25 Thread Jason Balicki
Charles K. Clarkson wrote: > As John already posted, you should be using warnings and > strict in your script. Below the first line (the shebang) > place these lines. This will break your script. You'll need > to ask some questions and read the documentation to get it

RE: Program to read data from serial port, filter and process

2005-01-25 Thread Charles K. Clarkson
Jason Balicki <[EMAIL PROTECTED]> wrote: : Some people emailed me privately and asked that I do post : what I've come up with to the list. : : I wrote this program over the course of the last week, : starting with very little perl experience (I've modified : others code, and small things like tha

Re: Program to read data from serial port, filter and process

2005-01-24 Thread John W. Krahn
Jason Balicki wrote: Some people emailed me privately and asked that I do post what I've come up with to the list. I wrote this program over the course of the last week, starting with very little perl experience (I've modified others code, and small things like that) and acomplished a goal that pri

Program to read data from serial port, filter and process

2005-01-24 Thread Jason Balicki
Some people emailed me privately and asked that I do post what I've come up with to the list. I wrote this program over the course of the last week, starting with very little perl experience (I've modified others code, and small things like that) and acomplished a goal that prior to last week I co

Re: IO::Filter::gzip question

2003-10-21 Thread Wiggins d Anconia
ust open the gzip file and read the contents. I am using this module because I am limed to a box running 5.6. > > Thanks in advance. > > script: > === > #!/usr/bin/perl > use IO::Filter::gzip; > $io = "denver.gz"; > $fio = new IO::Filter::gzip

IO::Filter::gzip question

2003-10-21 Thread Jose Malacara
just open the gzip file and read the contents. I am using this module because I am limed to a box running 5.6. Thanks in advance. script: === #!/usr/bin/perl use IO::Filter::gzip; $io = "denver.gz"; $fio = new IO::Filter::gzip ($io, "r"); print "$fio\n"; oup

Filter::Decrypt2

2003-10-15 Thread PerlDiscuss - Perl Newsgroups and mailing lists
This is perl, v5.6.1 built for i386-linux This is the file: #!/usr/bin/perl use Filter::decrypt2 ; ÿa8HS#5"W5ybnuFE*]S+ ... and a bunch more garble ... This is the output: "bad encryption format at /usr/bin/client_tools line 3." This is what I did: Not much. Basically just

Re: using FIle::Find::name if regex to filter

2003-06-24 Thread David Storrs
On Mon, Jun 23, 2003 at 09:14:25PM +0200, [EMAIL PROTECTED] wrote: > hi, how can i use a real regex with this: > > File::Find::name if -x? > > the filetestops are working fine, but how can i filter things like > .gz$? i tried many ways, but all failed. any idea? thanks!

Re: using FIle::Find::name if regex to filter

2003-06-23 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > hi, how can i use a real regex with this: > > File::Find::name if -x? > > the filetestops are working fine, but how can i filter things like > .gz$? i tried many ways, but all failed. any idea? thanks!! File::Find puts the current file name in

using FIle::Find::name if regex to filter

2003-06-23 Thread magelord
hi, how can i use a real regex with this: File::Find::name if -x? the filetestops are working fine, but how can i filter things like .gz$? i tried many ways, but all failed. any idea? thanks!! bye andreas -- .::Please visit my homepage::. http://www.math55.de.vu .::A very good JAVA site

RE: FILTER

2002-11-19 Thread Javeed SAR
- From: David Samuelsson (PAC) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 3:05 PM To: Javeed SAR; [EMAIL PROTECTED] Subject: RE: FILTER I wouldnt use perl for this. In outlook you have an rules wizard that can move mails when they arrive to a diffrent folder, but yes its sure is

RE: FILTER

2002-11-19 Thread David Samuelsson (PAC)
9 november 2002 05:28 To: [EMAIL PROTECTED] Subject: FILTER Hi, Can i filter incoming e-mails. I am using exchange server (outlook) on win2k. For example if i have send a mail with an attachement to a particular id say [EMAIL PROTECTED] , i want the perl scipt to see that it move the atta

Re: FILTER

2002-11-19 Thread Gavin Laking
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 19 Nov 2002 09:57:58 +0530 Javeed SAR <[EMAIL PROTECTED]> wrote: > Can i filter incoming e-mails. > I am using exchange server (outlook) on win2k. You can sure filter emails but I'm not sure how to with Exchange Server an

FILTER

2002-11-18 Thread Javeed SAR
Hi, Can i filter incoming e-mails. I am using exchange server (outlook) on win2k. For example if i have send a mail with an attachement to a particular id say [EMAIL PROTECTED] , i want the perl scipt to see that it move the attachement to local drive of my system. Is it possible.?? Regards

Re: Adult content filter in perl

2002-09-23 Thread George Schlossnagle
Warning - the following post contains adult language. Effectively blocking adult content is really really hard. First there are simple examples blocking 'cock' blocks 'John Hancock', and 'Sally Babcock'. Whereas things like 'suc-my-kock' will pass

Re: Adult content filter in perl

2002-09-23 Thread Joshua Hoblitt
adult content then my process will > foward the message to her aol account. > With a little help from Kevin Meltzer (Thanks Kevin) > and his suggestion to use MIME::Parser (MIME::Tools) > I'm half way there, but I'm a little stuck on how to > create an effective adult cont

Adult content filter in perl

2002-09-23 Thread Steve Gilbert
e MIME::Parser (MIME::Tools) I'm half way there, but I'm a little stuck on how to create an effective adult content filter. I thought I had seen on here a nifty peice of regexp but I can't find it. Anyone have any suggestions? TIA Steve __

RE: filter list of files from directory into array

2002-06-20 Thread David . Wagner
sday, June 20, 2002 15:55 To: [EMAIL PROTECTED] Subject: RE: filter list of files from directory into array When I tried: my @filelist = grep { -f "$dir/$_" && m/^\d{5,6}$/} readdir DIR; I got this message: Global symbol "$dir" requires explicit package n

RE: filter list of files from directory into array

2002-06-20 Thread Auernheimer, Rebecca (CORP, Consultant)
s. I was going to ask about $dir anyway, because I don't know where it came from. -Original Message- From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 3:40 PM To: [EMAIL PROTECTED] Subject: RE: filter list of files from directory into array on Thu, 20 Ju

Re: filter list of files from directory into array

2002-06-20 Thread drieux
On Thursday, June 20, 2002, at 03:03 , Auernheimer, Rebecca (CORP, Consultant) wrote: [..] > my @filelist = grep { $_ ne -d && m/^\d\d\d(\d|\d\d)\d$/ }, readdir DIR; > another close but no cigar you might try my @filelist = grep { /^\d{5,6}$/ && -f "$baseDir/$_" } readdir DIR ; The basic illu

RE: filter list of files from directory into array

2002-06-20 Thread Felix Geerinckx
on Thu, 20 Jun 2002 22:29:45 GMT, David Wagner wrote: > But unless you have done a chdir it will only pass the file name or > directory name and not do what you want. You are absolutely right. The line should read: my @filelist = grep { -f "$dir/$_" && m/^\d{5,6}$/} readdir DIR; whe

RE: filter list of files from directory into array

2002-06-20 Thread David . Wagner
But unless you have done a chdir it will only pass the file name or directory name and not do what you want. Wags ;) -Original Message- From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 15:31 To: [EMAIL PROTECTED] Subject: Re: filter list of files

Re: filter list of files from directory into array

2002-06-20 Thread Felix Geerinckx
on Thu, 20 Jun 2002 22:03:04 GMT, wrote: > So far, I am just trying to read a directory > of files into an array, but only those files that are named with 5 or > 6 numbers and no extension, like 12345 or 654321. I've got that part > down except that I don't know how to keep another directory ou

RE: filter list of files from directory into array

2002-06-20 Thread David . Wagner
Message- From: Auernheimer, Rebecca (CORP, Consultant) [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 15:03 To: [EMAIL PROTECTED] Subject: filter list of files from directory into array Hello List, I am working on my first "real" Perl program. I am using Active Perl 5.6 on Wi

filter list of files from directory into array

2002-06-20 Thread Auernheimer, Rebecca (CORP, Consultant)
Hello List, I am working on my first "real" Perl program. I am using Active Perl 5.6 on Windows NT/2000. So far, I am just trying to read a directory of files into an array, but only those files that are named with 5 or 6 numbers and no extension, like 12345 or 654321. I've got that part down

English filter ?

2002-05-01 Thread Kevin Cornmell
Please read the disclaimer at the bottom of this e-mail. Dear all, Is there a anything that takes a perl script and translates the special perl variables into their English.pm alias

  1   2   >