question regarding inplace edit

2006-01-11 Thread Rajarshi Das
Hi, The following one-liner replaces 'hola' with 'warnings' in-place in the script a.t. ./perl -e 's/hola/warnings/gi' -p -i.bak a.t However, it also creates a backup file a.t.bak with the original text. Is it possible that if an inplace edit is attempted without creating a backup file, perl

Re: bareword test on ebcdic.

2005-06-15 Thread Rajarshi Das
related qns are?) Thanks, Rajarshi. From: "John W. Krahn" <[EMAIL PROTECTED]> To: Rajarshi Das <[EMAIL PROTECTED]>, Perl Beginners Subject: Re: bareword test on ebcdic. Date: Wed, 15 Jun 2005 06:20:55 -0700 Rajarshi Das wrote: Hi, Following is a snaps

bareword test on ebcdic.

2005-06-15 Thread Rajarshi Das
Hi, Following is a snapshot of a bareword test : -- use utf8; my %hash = (те => 123); is($hash{те}, $hash{'те'}); --- It runs on ascii and passes but fails on ebcdic (z/OS, ibm-1047) with perl-5.8.6. The above two barewords (т and е) which make up

modifying the processed unicode value.

2005-06-13 Thread Rajarshi Das
Hi, This is on z/OS and perl-5.8.6. -- U8 u, *s; 1: s++; 2: u &= ((len >= 6) ? 0x01 : (0x1F >> (len-2))); 3: uv = (((u) << 5)|(PL_e2utf[(U8)(*s)] & ((U8)0x1f))); --- Before starting, s is set to "\x8a\x41" (utf-ebcdic byt

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 abov

no. of bytes for each matching code pt in $1

2005-06-02 Thread Rajarshi Das
Hi, I run 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; } if ($str =~ /(\p{inlatin1supplement}+)/) { print "\$1 : $1\n"; } I get the following values : a) for $a = 128 $b = 256 $1 has 1 byte representations for each of (128-

codepoint value 192 on utfebcdic(pls. ignore my previous mail with the same sub)

2005-06-01 Thread Rajarshi Das
Hi, I run this on z/OS and perl-5.8.6. $a = 160; $b = 240; for($i=$a;$i<=$b;$i++) { $str = join "",$str, pack 'U*',$i; } if ($str =~ /(\p{inlatin1supplement}+)/) { print "\$1 : $1\n"; } 1) If I pipe the o/p to od -tc -tx, $1 shows me two bytes for each code pt value (e.g. \x8a\x41 for value=

codepoint value 192 on utf-ebcdic.

2005-06-01 Thread Rajarshi Das
Hi, I run this on z/OS and perl-5.8.6. 3) If $a = 160 and $b = 192, $1 shows 2 bytes for each matching code pt value. $a = 160; $b = 240; for($i=$a;$i<=$b;$i++) { $str = join "",$str, pack 'U*',$i; } if ($str =~ /(\p{inlatin1supplement}+)/) { print "\$1 : $1\n"; } 1) If I pipe the o/p to od

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 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 Prop

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

2005-05-12 Thread Rajarshi Das
es in PVA_abbr_map (in PVA.pl), but perl -d still continues to follow the original sequence of property names and exits before 'ea' is used. Please let me know if some other details are required. Thanks, Rajarshi. From: Chris Devers <[EMAIL PROTECTED]> Reply-To: beginners@perl.org To: R

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

debugging XS code.

2005-05-09 Thread Rajarshi Das
Hi, I am running perl-5.8.6 on z/OS. How do I debug XS code ? 1) I have a specific function "static SV *encode_method()" in a xs file. The fn name remains the same in the corresponding c file. I am unable to break at this fn within the c file although perl is built with -g. Any thoughts on how t

utf8 questions.

2005-04-18 Thread Rajarshi Das
Hi, I am using perl-5.8.6 on z/OS. 1) What is the BOM on z/OS ? Basically, I cant print the chars "\xFE\xFF". Even though \xFE is defined as Latin Capital Letter U with Acute, the char doesnt display. Also, \xFF isnt defined. 2) What is the difference between the utf8::encode and utf8::upgrade

Re: what are utf8 barewords.?

2005-04-14 Thread Rajarshi Das
Thanks for all the help, Rajarshi. From: Chris Devers <[EMAIL PROTECTED]> Reply-To: Perl Beginners List To: Rajarshi Das <[EMAIL PROTECTED]> CC: Perl Beginners List Subject: Re: what are utf8 barewords.? Date: Thu, 14 Apr 2005 10:27:13 -0400 (EDT) On Thu, 14 Apr 2005, Rajarshi Das wrote:

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, inst

what are utf8 barewords.?

2005-04-14 Thread Rajarshi Das
Hi, Barewords acccording to perldata.pod are "words that donot have any other meaning in grammar". 1) So, does this mean that any word which is not reserved is a bareword ? 2) What exactly would be a utf8 bareword ? Is it any utf8 encoded character ? Any examples ? Would "\x69\x22" qualify as a u

EastAsianWidth test.

2005-03-29 Thread Rajarshi Das
On Tue, 29 Mar 2005 11:08:05 +0530, Rajarshi Das wrote: Hi, I am running a EastAsianWidth property test on z/OS using perl-5.8.6. $str = chr(0xA1).chr(0xA2); if ($str =~ /(\p{EastAsianWidth: A}+)/) { print "match"; } else { print "no match"; } I'm using perl-5.8

EastAsianWidth test.

2005-03-28 Thread Rajarshi Das
Hi, I am running a EastAsianWidth property test on z/OS using perl-5.8.6. $str = chr(0xA1).chr(0xA2); if ($str =~ /(\p{EastAsianWidth: A}+)/) { print "match"; } else { print "no match"; } First, is the above regex supposed to mean this : does $str contain chars one or more of which has a "

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 = unpack"U0U", "\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 stric

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 = unpack"U0U", "\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

RE: z/OS unicode problem.

2005-03-03 Thread Rajarshi Das
You need to remove the "0x00" after each character and then do the Regular Expression matching. my $temp = chr(0x00); $line =~ s/$temp//g; this remove the Unicode characters from the line. Regds Suresh -Original Message- From: Rajarshi Das [mailto:[EMAIL PROTECTED] Sent: Thu

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 A WITH GRAV

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. O