Re: Delete file if it contains x y or z

2008-09-07 Thread Peter Scott
On Sat, 06 Sep 2008 16:01:08 +0100, brian54321uk wrote: Just tried this, nothing happened at all. Really. $ echo abc /tmp/bar/one $ echo xyz /tmp/bar/two $ echo ab..yz /tmp/bar/three $ ls /tmp/bar one three two $ cat /tmp/foo #!/usr/bin/perl use strict; use warnings; sub delete_containing

Re: Delete file if it contains x y or z

2008-09-06 Thread Aruna Goke
Mr. Shawn H. Corey wrote: On Fri, 2008-09-05 at 19:09 +0100, brian54321uk wrote: HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? If however, it would

Re: Delete file if it contains x y or z

2008-09-06 Thread Aruna Goke
brian54321uk wrote: Aruna Goke wrote: Mr. Shawn H. Corey wrote: On Fri, 2008-09-05 at 19:09 +0100, brian54321uk wrote: HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of

Re: Delete file if it contains x y or z

2008-09-06 Thread Dr.Ruud
brian54321uk schreef: I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? I would use `grep -l` to get the list of filenames, and rm to unlink them. No Perl

Re: Delete file if it contains x y or z

2008-09-06 Thread John W. Krahn
Dr.Ruud wrote: brian54321uk schreef: I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? I would use `grep -l` to get the list of filenames, and rm to unlink them.

Re: Delete file if it contains x y or z

2008-09-06 Thread John W. Krahn
Aruna Goke wrote: brian54321uk wrote: Aruna Goke wrote: Mr. Shawn H. Corey wrote: On Fri, 2008-09-05 at 19:09 +0100, brian54321uk wrote: HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the

Re: Delete file if it contains x y or z

2008-09-06 Thread brian54321uk
John W. Krahn wrote: Aruna Goke wrote: brian54321uk wrote: Aruna Goke wrote: Mr. Shawn H. Corey wrote: On Fri, 2008-09-05 at 19:09 +0100, brian54321uk wrote: HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be

Re: Delete file if it contains x y or z

2008-09-06 Thread brian54321uk
John W. Krahn wrote: Dr.Ruud wrote: brian54321uk schreef: I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? I would use `grep -l` to get the list of filenames,

Re: Delete file if it contains x y or z

2008-09-06 Thread brian54321uk
Aruna Goke wrote: brian54321uk wrote: Aruna Goke wrote: Mr. Shawn H. Corey wrote: On Fri, 2008-09-05 at 19:09 +0100, brian54321uk wrote: HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the

Re: Delete file if it contains x y or z

2008-09-06 Thread Peter Scott
On Fri, 05 Sep 2008 19:09:25 +0100, brian54321uk wrote: I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? One way: use strict; use warnings; sub

Re: Delete file if it contains x y or z

2008-09-06 Thread brian54321uk
Peter Scott wrote: On Fri, 05 Sep 2008 19:09:25 +0100, brian54321uk wrote: I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? One way: use strict; use warnings;

Re: Delete file if it contains x y or z

2008-09-06 Thread brian54321uk
[EMAIL PROTECTED] wrote: Here's another way, but not necessarily the best Perl, but it does work: #!/usr/bin/env perl use strict; use warnings; my @filelist=STDIN; chomp @filelist; my $match_strings=qr '(abc123blue|xyz357green)'; my ($file, ); foreach $file (@filelist) { #print file=$file\n;

Re: Delete file if it contains x y or z

2008-09-06 Thread asmith9983
Here's another way, but not necessarily the best Perl, but it does work: #!/usr/bin/env perl use strict; use warnings; my @filelist=STDIN; chomp @filelist; my $match_strings=qr '(abc123blue|xyz357green)'; my ($file, ); foreach $file (@filelist) { #print file=$file\n; open(FD,$file) or die

Delete file if it contains x y or z

2008-09-05 Thread brian54321uk
HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? If however, it would be simpler for the script to empty the files contents, that's not a problem as I

Re: Delete file if it contains x y or z

2008-09-05 Thread Raja Vadlamudi
On Fri, Sep 5, 2008 at 2:09 PM, brian54321uk [EMAIL PROTECTED]wrote: HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? If however, it would be simpler

Re: Delete file if it contains x y or z

2008-09-05 Thread Mr. Shawn H. Corey
On Fri, 2008-09-05 at 19:09 +0100, brian54321uk wrote: HI again I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted. What would be the best way of achieving this please? If however, it would be simpler for the script

Re: Delete file if it contains x y or z

2008-09-05 Thread Jeff Pang
2008/9/6 Raja Vadlamudi [EMAIL PROTECTED]: for (glob(folder/*)) { unlink if m/abc123blue|xyz357green/; } This would also delete abc123blue.exe, abc123blue.txt, otherabc123blue etc. OP could consider to use File::Find to do that. -- Regards, Jeff. -- To unsubscribe, e-mail: [EMAIL

Re: Net:FTP send JOB from Windows to z/OS mainframe and get output

2007-12-08 Thread Kayakman
On Dec 5, 3:54 pm, [EMAIL PROTECTED] (Mariusz) wrote: Hello list, I am able to send a JOB to z/OS usinf Net::FTP. But I would like to receive the job output of the submitted job too. Do you know how should be used Net::FTP to achieve this ? Best regards Mariusz You can use the MVS

Net:FTP send JOB from Windows to z/OS mainframe and get output

2007-12-05 Thread mariusz
Hello list, I am able to send a JOB to z/OS usinf Net::FTP. But I would like to receive the job output of the submitted job too. Do you know how should be used Net::FTP to achieve this ? Best regards Mariusz -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Net:FTP send JOB from Windows to z/OS mainframe and get output

2007-12-05 Thread yitzle
CPAN Net::FTP sats it inherits from Net::Cmd Take a look at Net::Cmd http://search.cpan.org/~gbarr/libnet-1.22/Net/Cmd.pm It got a bunch of methods that look like they may help you, eg debug(), response() -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

z

2005-12-10 Thread Beau E. Cox
Hi beginners - Aloha = Beau; [EMAIL PROTECTED] 2005-12-10 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

z

2005-12-10 Thread Beau E. Cox
Hi beginners - Aloha = Beau; [EMAIL PROTECTED] 2005-12-10 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: z

2005-12-10 Thread Chris Devers
On Sat, 10 Dec 2005, Beau E. Cox wrote: Hi beginners - Aloha = Beau; [EMAIL PROTECTED] 2005-12-10 You don't say! :-) -- Chris Devers ·¾fm)cÓTO¥†Ü -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

confusing no. of bytes in $1 (z/OS, perl-5.8.6)

2005-06-06 Thread Rajarshi Das
I run the following script : $a = 160; $b = 256; for ($i=$a;$i=$b;$i++) { $str = join '', $str, pack 'U*', $i; } if ($str =~ /(\p{inlatin1supplement}+)/) { print \$1 : $1\n; } on redirecting above o/p to od -tc -tx, $1 has 2 bytes for all matching code point values (160-255). If the above

how to use perl module to do Z-scores test (Say, Wilcoxon)

2005-06-06 Thread Frank Lee
Can anybody give me some ideas about how to use perl module to do Z-scores test (Say, Wilcoxon).? Thanks very much! -- Do not guess who I am. I am not Bush in BlackHouse -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org

Re: how to use perl module to do Z-scores test (Say, Wilcoxon)

2005-06-06 Thread Chris Devers
On Tue, 7 Jun 2005, Frank Lee wrote: Can anybody give me some ideas about how to use perl module to do Z-scores test (Say, Wilcoxon).? 1. Find the module. 2. Look up the Perldoc that describes how to use it. 3. Use it. I'll be glad to help you a bit with step #1 there. A search for Z

Re: how to use perl module to do Z-scores test (Say, Wilcoxon)

2005-06-06 Thread Frank Lee
Hi, Chris, That's very nice! It is very helpful for me. I can use the Z-test in the Mastering Algorithms with Perl. Thanks very much! Frank On 6/7/05, Chris Devers [EMAIL PROTECTED] wrote: On Tue, 7 Jun 2005, Frank Lee wrote: Can anybody give me some ideas about how to use perl module

char display on z/OS

2005-05-27 Thread rajarshi das
Hi, I am running this on z/OS and perl-5.8.6. $a = 128; $b = 256; for($i=$a;$i=$b;$i++) { $str = join ,$str, pack 'U*',$i; } print str : $str\n; If I print $str and do a od -tc -tx, I notice that the chars corresponding to values 128 through 159 show up as single (ebcdic) bytes whereas

chr function on z/OS.

2005-05-24 Thread rajarshi das
Hi, I have a basic doubt regarding unicode and z/OS (ebcdic : ibm-1047). $a = chr(0x00A1); $b = chr(0xA1); Should $a and $b be equal or yield different results ? $b is definitely the character ~. Is $a also the same thing or is it the character equivalent to \xAA ? $a on linux gives me

Re: modify PVA.pl (z/OS and perl-5.8.6)

2005-05-13 Thread Jeff 'japhy' Pinyan
On May 13, Rajarshi Das said: PVA.pl (PVA stands for Property Value Aliases) is a runtime file for unicode which is generated by the mktables utility using the file lib/unicore/PropValueAliases.txt. One of the properties in PropValueAliases.txt is EastAsianWidth for which 'A' is a value which

Re: modify PVA.pl (z/OS and perl-5.8.6)

2005-05-13 Thread Rajarshi Das
From: Jeff 'japhy' Pinyan [EMAIL PROTECTED] To: Rajarshi Das [EMAIL PROTECTED] CC: [EMAIL PROTECTED], beginners@perl.org Subject: Re: modify PVA.pl (z/OS and perl-5.8.6) Date: Fri, 13 May 2005 07:30:44 -0400 (EDT) On May 13, Rajarshi Das said: PVA.pl (PVA stands for Property Value Aliases

modify PVA.pl (z/OS and perl-5.8.6)

2005-05-12 Thread Rajarshi Das
Hi, I am running a test which uses PVA_abbr_map and fails while checking the property EastAsianWidth:A. Is it possible (the pl file says not allowed) to manually modify PVA.pl (the order of properties in PVA_abbr_map) and get perl -d to run according to the new order ? e.g. the test originally

Re: modify PVA.pl (z/OS and perl-5.8.6)

2005-05-12 Thread Chris Devers
On Thu, 12 May 2005, Rajarshi Das wrote: I am running a test which uses PVA_abbr_map and fails while checking the property EastAsianWidth:A. Is it possible (the pl file says not allowed) to manually modify PVA.pl (the order of properties in PVA_abbr_map) and get perl -d to run according to

Re: modify PVA.pl (z/OS and perl-5.8.6)

2005-05-12 Thread Rajarshi Das
: Re: modify PVA.pl (z/OS and perl-5.8.6) Date: Thu, 12 May 2005 11:21:23 -0400 (EDT) On Thu, 12 May 2005, Rajarshi Das wrote: I am running a test which uses PVA_abbr_map and fails while checking the property EastAsianWidth:A. Is it possible (the pl file says not allowed) to manually modify

bareword test on z/OS unix.

2005-04-14 Thread Rajarshi Das
Hi, I am running perl-5.8.6 on z/OS unix. I am trying to display the character 'tau'. This on linux (RH) shows as is, meaning I can actually include the character 'tau' as it displays, in a perl script. But, if I try copy pasting the same character on a z/OS shell, I dont see the character

Re: z/OS unicode error.

2005-03-15 Thread Dave Gray
of those errors by changing the pack/unpack template to UU or U*... What are you trying to accomplish with U0U? I figured that the malformed character error that you mentioned, doesnt show up on z/OS while using 'U0U'. This is even if I run the same with 'use strict' and 'use warnings'. Also

z/OS unicode error.

2005-03-14 Thread Rajarshi Das
I am running perl 5.8.6 on z/OS unix. I am doing these : $u = unpackU0U, \x8a\x73; print \n\$u : $u; $p = pack(U0U, $u); print \n\$p : $p; Are you running with strict and warnings turned on? Because I'm getting Malformed UTF-8 character messages running this: #!/usr/bin/perl use strict; use

pack-unicode problem (z/OS)

2005-03-11 Thread Rajarshi Das
Hi, I am running perl 5.8.6 on z/OS unix. I am doing these : $u = unpackU0U, \x8a\x73; print \n\$u : $u; $p = pack(U0U, $u); print \n\$p : $p; This intuitively suggests that $p should be set to the chars \x8a and \x73. But that isnt the case. Instead I get the char \x59. Alternately, If I

Re: pack-unicode problem (z/OS)

2005-03-11 Thread Dave Gray
I am running perl 5.8.6 on z/OS unix. I am doing these : $u = unpackU0U, \x8a\x73; print \n\$u : $u; $p = pack(U0U, $u); print \n\$p : $p; Are you running with strict and warnings turned on? Because I'm getting Malformed UTF-8 character messages running this: #!/usr/bin/perl use

RE: z/OS unicode problem.

2005-03-03 Thread Graeme St. Clair
. Rgds, GStC. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 11:59 PM To: [EMAIL PROTECTED]; beginners@perl.org Subject: RE: z/OS unicode problem. Hi, May be this is could be useful; Unicode characters have two bytes for each

RE: z/OS unicode problem.

2005-03-03 Thread Graeme St. Clair
d (Bb is good (B$VAR1 = '\x{e0}'; (B$VAR2 = '\x{c0}'; (B (BHTH, GStC. (B (B (B (B-Original Message- (BFrom: Rajarshi Das [mailto:[EMAIL PROTECTED] (BSent: Wednesday, March 02, 2005 7:03 PM (BTo: beginners@perl.org (BSubject: z/OS unicode problem. (B (BHi, (BI had a ques

RE: z/OS unicode problem.

2005-03-03 Thread Rajarshi Das
. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED], beginners@perl.org Subject: RE: z/OS unicode problem. Date: Thu, 3 Mar 2005 10:29:22 +0530 Hi, May be this is could be useful; Unicode characters have two bytes for each character. Each character has 0x00 following to the each character. You need

z/OS unicode problem.

2005-03-02 Thread Rajarshi Das
Hi, I had a question regarding utf-ebcdic issues on z/OS. I tried this on a perl-5.8.6. If I use a unicode character within a character class and try matching the same using a regular expression, I get a failure. e.g. if I write this ; use charnames:full; $a = \N{LATIN SMALL LETTER

RE: z/OS unicode problem.

2005-03-02 Thread suresh.pasupula
the Unicode characters from the line. Regds Suresh -Original Message- From: Rajarshi Das [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 5:33 AM To: beginners@perl.org Subject: z/OS unicode problem. Hi, I had a question regarding utf-ebcdic issues on z/OS. I tried this on a perl

compilation error on z/OS

2004-12-23 Thread Rajarshi Das
Hi, I downloaded perl-5.8.5 and have built the same on a z/OS box with dynamic loading enabled (-Dmake=gmake -Dusedl -de). However, if I run the Embed.t test script, I get a error : archive library 'libperl.a' not found. The libperl.a wasnt built. However, a libperl.so was built by default

Re: substitute on \Z

2004-10-20 Thread Bryan Harris
to know why this doesn't work as expected? perl -e '$_=1\n;s/\Z/2/g;print' Why does it print 2 twice? It works as *I* expect it to. \Z matches at the end of the string, OR before a NEWLINE at the end of the string. Therefore, in the string japhy, \Z matches after the 'y

substitute on \Z

2004-10-19 Thread Bryan Harris
Does anyone happen to know why this doesn't work as expected? perl -e '$_=1\n;s/\Z/2/g;print' Why does it print 2 twice? Assuming I have to leave the /g modifier in there, how can I prevent this? TIA. - Bryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: substitute on \Z

2004-10-19 Thread Jeff 'japhy' Pinyan
On Oct 19, Bryan Harris said: Does anyone happen to know why this doesn't work as expected? perl -e '$_=1\n;s/\Z/2/g;print' Why does it print 2 twice? It works as *I* expect it to. \Z matches at the end of the string, OR before a NEWLINE at the end of the string. Therefore, in the string

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-04-10 Thread Bram Mertens
On Wed, 2004-03-31 at 03:43, Harry Putnam wrote: [...] Thanks, but I should have mentioned that I'm NOT testing the from header. I'm trying to catch messages that look like bounced messages from me but that don't include my correct e-mail-info. [...] I worked it out, here's my solution for

how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Bram Mertens
Hi I'm trying to write a rule for SpamAssassin that looks for the following in a message: From: followed by anything BUT 'Mertens Bram' or 'Bram Mertens' followed by my_e-mail-address So these two shouldn't trigger the rule: From: Bram Mertens my_e-mail-address From: Mertens Bram

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Harry Putnam
Bram Mertens [EMAIL PROTECTED] writes: Somebody suggested to use a rule like: /From\:\s.*\s*my_e-mail-address/i And another rule to catch the 2 exceptions. But the .* means that the parser might test the entire e-mail making the test slow and heavy on memory-usage. Something like:

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Bram Mertens
On Tue, 2004-03-30 at 17:37, Harry Putnam wrote: [...] You may get some REALLY inventive regex here... I have before. But I think you're working too hard and should resort to spamassassins own tools. This can be done with a push/pull technique. Investigate spamassassins `meta' handle. (In

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Harry Putnam
Bram Mertens [EMAIL PROTECTED] writes: From: Bram Mertens [EMAIL PROTECTED] Subject: Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z' To: perl beginners-digest mailing list [EMAIL PROTECTED] Date: Tue, 30 Mar 2004 18:27:58 +0200 Message-Id: [EMAIL PROTECTED] On Tue, 2004-03-30

Re: how do I write a regex that looks for 'X' 'NOT Y' 'Z'

2004-03-30 Thread Bram Mertens
this doesn't work, I think it has to do with the look-back expression, but I don't quite understand how it's supposed to work in this regex. Perhaps I need to nest a look-behind inside a look-ahead? Something like: X followed by Y where Y is: Z NOT preceded by W Any ideas how I should write this? I'm

RE: match only a-z or 0-9

2002-11-13 Thread Timothy Johnson
Message- From: Alex Cheung Tin Ka To: [EMAIL PROTECTED] Sent: 11/12/02 11:14 PM Subject: match only a-z or 0-9 Dear All, Could anyone tell me how to make a regular expression for match a string only [a-z0-9] ? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

RE: match only a-z or 0-9

2002-11-13 Thread Timothy Johnson
Correction: That should be [a-z0-9]+. (note the plus) -Original Message- From: Timothy Johnson To: 'Alex Cheung Tin Ka '; '[EMAIL PROTECTED] ' Sent: 11/13/02 12:01 AM Subject: RE: match only a-z or 0-9 You've essentially already done it. [a-z0-9] is a character class that includes

match only a-z or 0-9

2002-11-12 Thread Alex Cheung Tin Ka
Dear All, Could anyone tell me how to make a regular expression for match a string only [a-z0-9] ? Thanks

Re: match only a-z or 0-9

2002-11-12 Thread David Buddrige
[a-z0-9]+ will match a sequence of characters containing one or more of the set [a-z0-9]. If you want to match a line of characters that contains NOTHING BUT [a-z0-9] then you could use: ^[a-z0-9]+$ If you want to match a sequence of characters that must start with [a-z] and contain any number

Re: Compress::Zlib and .Z files dont work !!

2001-12-26 Thread Gregory
Sorry my bad english Yes , and the error is the same -3 (Z_DATA_ERROR) ... If you have any sample .. send me please At 21/12/2001 10:30 AM, Michael Fowler wrote: On Fri, Dec 21, 2001 at 10:17:58AM -0200, Gregory wrote: I try the inflate example . and dont work again And

Re: Compress::Zlib and .Z files dont work !!

2001-12-26 Thread Michael Fowler
On Wed, Dec 26, 2001 at 04:19:08PM -0200, Gregory wrote: Sorry my bad english Yes , and the error is the same -3 (Z_DATA_ERROR) ... If you have any sample .. send me please Then it's likely your file is in a format zlib doesn't understand; you'll have to use another tool to extract

Re: Compress::Zlib and .Z files dont work !!

2001-12-21 Thread Gregory
Hi , I try the inflate example . and dont work again The error is -3 (Z_DATA_ERROR) , but i can uncompress or zcat in the file at the line command of unix. WHAT IS WRONG or the module dont work ??? the sample is : use strict ; use warnings ; use Compress::Zlib ;

Re: Compress::Zlib and .Z files dont work !!

2001-12-21 Thread Michael Fowler
On Fri, Dec 21, 2001 at 10:17:58AM -0200, Gregory wrote: I try the inflate example . and dont work again And the uncompress method? Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail:

Compress::Zlib and .Z files dont work !!

2001-12-20 Thread Gregory
Hi i have a .Z file generated by compress and i need read this file in a Perl script. I install the Compress::Zlib to do this, but the samples of Compress::Zlib dont work !! The example work like a 'cat file.Z' not a zcat. What is wrong ?? Any body have a sample ??? Sorry the bad English