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
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
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
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
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.
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
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
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,
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
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
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;
[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;
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
.
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
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
.
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
Dear All,
Could anyone tell me how to make a regular expression for match a string only
[a-z0-9] ?
Thanks
[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
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
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
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 ;
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:
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
63 matches
Mail list logo