search and replace

Hello Perl community,
Once more excuse me for asking something very basic. I have a file which has five-digit strings. Some of the groups may contains from one to five slashes, as below.
///// ///// 92765 15426 679// 28011 10660 831//

In the code below I am reading from file1, replacing every occurence of / by 9 and rewriting the strings in file2, and deleting original file1. I am getting an error as "use of uninitialised value is substitution s///" indicating the error is on the line with "$slashes =~ s/\/{1,5}/9{1,5}/g;".

am working on Windows with Cygwin.

My reading of the literature does not yield any solution. Assistance will be appreciated.

Zilore.

#!/usr/bin/perl --

use strict;
use warnings;
use POSIX;
use File::Path;
use File::Copy;

# Variable declaration
my $debug = 1;

my $file1 = "file1.txt";
print "file1='$file1'\n" if $debug;
my $file2 = "file2.txt";
print "file2='$file2'\n" if $debug;

my [at] slashes;
my $slashes;

open (OUT1, "<$file1") or die "open '$file1: failed $! ($^E)";
open (OUT2, ">$file2") or die "open '$file2: failed $! ($^E)";
[at] slashes = <OUT1>;
close OUT1;

for my $i ( [at] slashes) {
$slashes =~ s/\/{1,5}/9{1,5}/g;
}

print OUT2 " [at] slashes";
close OUT2;

unlink $file1 or die "Failed to delede $file1: $!\n";

__END__





_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
zilore mumba [ Fr, 08 Mai 2009 10:35 ] [ ID #2000632 ]

Re: search and replace

zilore mumba wrote:
> Hello Perl community,
> Once more excuse me for asking something very basic. I have a file which has five-digit strings. Some of the groups may contains from one to five slashes, as below.
> ///// ///// 92765 15426 679// 28011 10660 831//
>
> In the code below I am reading from file1, replacing every occurence of / by 9 and rewriting the strings in file2, and deleting original file1. I am getting an error as "use of uninitialised value is substitution s///" indicating the error is on the line with "$slashes =~ s/\/{1,5}/9{1,5}/g;".
....
> open (OUT1,
> open (OUT2,

I'd change OUT1 and OUT2 to IN and OUT.

> for my $i ( [at] slashes) {
> $slashes =~ s/\/{1,5}/9{1,5}/g;
> }

$slashes isn't set anywhere.
$_ contains each line of [at] slashes by default, so:

for ( [at] slashes) {
s/\//9/g;
}

would be apropos.
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Bill Luebkert [ Fr, 08 Mai 2009 10:50 ] [ ID #2000633 ]

Re: search and replace

Bill,
thanks very much, the solution you gave me works very fine.
Good Day
Zilore



--- On Fri, 5/8/09, Bill Luebkert <dbecoll [at] roadrunner.com> wrote:

> From: Bill Luebkert <dbecoll [at] roadrunner.com>
> Subject: Re: search and replace
> To: zmumba [at] yahoo.com
> Cc: activeperl [at] listserv.activestate.com
> Date: Friday, May 8, 2009, 11:50 AM
> zilore mumba wrote:
> > Hello Perl community,
> > Once more excuse me for asking something very basic. I
> have a file which has five-digit strings. Some of the groups
> may contains from one to five slashes, as below.
> > ///// ///// 92765 15426 679// 28011 10660 831//
> >
> > In the code below I am reading from file1, replacing
> every occurence of / by 9 and rewriting the strings in
> file2, and deleting original file1. I am getting an error as
> "use of uninitialised value is substitution s///"
> indicating the error is on the line with "$slashes =~
> s/\/{1,5}/9{1,5}/g;".
> ...
> > open (OUT1,
> > open (OUT2,
>
> I'd change OUT1 and OUT2 to IN and OUT.
>
> > for my $i ( [at] slashes) {
> > $slashes =~ s/\/{1,5}/9{1,5}/g;
> > }
>
> $slashes isn't set anywhere.
> $_ contains each line of [at] slashes by default, so:
>
> for ( [at] slashes) {
> s/\//9/g;
> }
>
> would be apropos.
> _______________________________________________
> ActivePerl mailing list
> ActivePerl [at] listserv.ActiveState.com
> To unsubscribe:
> http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
zilore mumba [ Fr, 08 Mai 2009 13:42 ] [ ID #2000634 ]

Re: search and replace

Deane,
Thanks very much for your suggestion. It works and it is very similar to what Bill gave. Thanks all for the effort.
Zilore




--- On Fri, 5/8/09, Deane.Rothenmaier [at] walgreens.com <Deane.Rothenmaier [at] walgreens.com> wrote:

> From: Deane.Rothenmaier [at] walgreens.com <Deane.Rothenmaier [at] walgreens.com>
> Subject: Re: search and replace
> To: zmumba [at] yahoo.com
> Date: Friday, May 8, 2009, 3:58 PM
> >for my $i ( [at] slashes) {
> > $slashes =~ s/\/{1,5}/9{1,5}/g;
> > }
>
> Your problem is this: You're pacing through the array
> and slapping each
> member into the variable $i, then doing the substitution on
> the
> (uninitialized) $slashes. Suggestion: remove the "my
> $i" from the for
> loop, viz.:
>
> for ( [at] slashes) {
> $_ =~ s/\/{1,5}/9{1,5}/g;
> }
>
> One thing I'm not certain about is whether the {1,5} is
> even necessary--or
> if it will DWIM, since you're doing a global
> substitution. Better might be
> just:
>
> for ( [at] slashes) {
> $_ =~ s/\//9/g;
> }
>
> HTH.
>
> Deane Rothenmaier
> Programmer/Analyst
> Walgreens Corp.
> 224-542-5150
>
> I look forward to the invention of faster-than-light
> travel. What I do not
> look forward to is the long wait in the dark once I arrive
> at my
> destination. - Marc Beland



_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
zilore mumba [ Fr, 08 Mai 2009 19:30 ] [ ID #2000635 ]

Re: search and replace

--===============1050293803==
Content-Type: multipart/alternative; boundary=001636c5b1fae2f6d404696a8d7f

--001636c5b1fae2f6d404696a8d7f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

My understanding with Perl as well as my editor of choice ViM or gvim, and
other tools, is to use a character not in your search or replace set as
your pattern delimiter rather than /, such as # or !. It makes your code
much more readable.

--
Andrew in Edinburgh

2009/5/8 zilore mumba <zmumba [at] yahoo.com>

>
> Hello Perl community,
> Once more excuse me for asking something very basic. I have a file which
> has five-digit strings. Some of the groups may contains from one to five
> slashes, as below.
> ///// ///// 92765 15426 679// 28011 10660 831//
>
> In the code below I am reading from file1, replacing every occurence of /
> by 9 and rewriting the strings in file2, and deleting original file1. I am
> getting an error as "use of uninitialised value is substitution s///"
> indicating the error is on the line with "$slashes =~ s/\/{1,5}/9{1,5}/g;".
>
> am working on Windows with Cygwin.
>
> My reading of the literature does not yield any solution. Assistance will
> be appreciated.
>
> Zilore.
>
> #!/usr/bin/perl --
>
> use strict;
> use warnings;
> use POSIX;
> use File::Path;
> use File::Copy;
>
> # Variable declaration
> my $debug = 1;
>
> my $file1 = "file1.txt";
> print "file1='$file1'\n" if $debug;
> my $file2 = "file2.txt";
> print "file2='$file2'\n" if $debug;
>
> my [at] slashes;
> my $slashes;
>
> open (OUT1, "<$file1") or die "open '$file1: failed $! ($^E)";
> open (OUT2, ">$file2") or die "open '$file2: failed $! ($^E)";
> [at] slashes = <OUT1>;
> close OUT1;
>
> for my $i ( [at] slashes) {
> $slashes =~ s/\/{1,5}/9{1,5}/g;
> }
>
> print OUT2 " [at] slashes";
> close OUT2;
>
> unlink $file1 or die "Failed to delede $file1: $!\n";
>
> __END__
>
>
>
>
>
> _______________________________________________
> ActivePerl mailing list
> ActivePerl [at] listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

--001636c5b1fae2f6d404696a8d7f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

My understanding with Perl as well as my editor of choice ViM or gvim, and =
other tools,=A0 is to use a character not in your search=A0 or replace set=
=A0 as your pattern delimiter rather than /, such as # or !. It makes your =
code much more readable.<br>
<br>--<br>Andrew in Edinburgh<br><br><div class=3D"gmail_quote">2009/5/8 zi=
lore mumba <span dir=3D"ltr"><<a href=3D"mailto:zmumba [at] yahoo.com">zmumba=
[at] yahoo.com</a>></span><br><blockquote class=3D"gmail_quote" style=3D"bor=
der-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-=
left: 1ex;">
<br>
Hello Perl community,<br>
Once more excuse me for asking something very basic. I have a file which ha=
s five-digit strings. Some of the groups may contains from one to five slas=
hes, as below.<br>
///// ///// 92765 15426 679// 28011 10660 831//<br>
<br>
In the code below I am reading from file1, replacing every occurence of / b=
y 9 and rewriting the strings in file2, and deleting original file1. I am g=
etting an error as "use of uninitialised value is substitution s///&qu=
ot; indicating the error is on the line with "$slashes =3D~ s/\/{1,5}/=
9{1,5}/g;".<br>

<br>
am working on Windows with Cygwin.<br>
<br>
My reading of the literature does not yield any solution. Assistance will b=
e appreciated.<br>
<br>
Zilore.<br>
<br>
#!/usr/bin/perl --<br>
<br>
use strict;<br>
use warnings;<br>
use POSIX;<br>
use File::Path;<br>
use File::Copy;<br>
<br>
# Variable declaration<br>
my $debug =3D 1;<br>
<br>
my $file1 =3D "file1.txt";<br>
print "file1=3D'$file1'\n" if $debug;<br>
my $file2 =3D "file2.txt";<br>
print "file2=3D'$file2'\n" if $debug;<br>
<br>
=A0 =A0my [at] slashes;<br>
=A0 =A0my $slashes;<br>
<br>
=A0 =A0open (OUT1, "<$file1") or die "open '$file1: =
failed $! ($^E)";<br>
=A0 =A0open (OUT2, ">$file2") or die "open '$file2: =
failed $! ($^E)";<br>
=A0 =A0 =A0 =A0 [at] slashes =3D <OUT1>;<br>
=A0 =A0close OUT1;<br>
<br>
for my $i ( [at] slashes) {<br>
=A0 $slashes =3D~ s/\/{1,5}/9{1,5}/g;<br>
=A0 }<br>
<br>
print OUT2 " [at] slashes";<br>
close OUT2;<br>
<br>
unlink $file1 or die "Failed to delede $file1: $!\n";<br>
<br>
__END__<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
ActivePerl mailing list<br>
<a href=3D"mailto:ActivePerl [at] listserv.ActiveState.com">ActivePerl [at] listserv.=
ActiveState.com</a><br>
To unsubscribe: <a href=3D"http://listserv.ActiveState.com/mailman/mysubs" =
target=3D"_blank">http://listserv.ActiveState.com/mailman/my subs</a><br>
</blockquote></div><br>

--001636c5b1fae2f6d404696a8d7f--

--===============1050293803==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1050293803==--
asmith9983 [ Fr, 08 Mai 2009 20:11 ] [ ID #2000636 ]

Re: search and replace

--============== 36614742==
Content-Type: multipart/alternative;
boundary="part1_c23.5effad00.3735cff6_boundary"


--part1_c23.5effad00.3735cff6_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

hi deane --

In a message dated 5/8/2009 12:31:27 PM Eastern Standard Time,
zmumba [at] yahoo.com writes:

> > for ( [at] slashes) {
> > $_ =~ s/\/{1,5}/9{1,5}/g;
> > }
> >
> > One thing I'm not certain about is whether the {1,5} is
> > even necessary--or
> > if it will DWIM, since you're doing a global
> > substitution. Better might be
> > just:
> >
> > for ( [at] slashes) {
> > $_ =~ s/\//9/g;
> > }

the invocation of s/// is s/SEARCH/REPLACE/modifiers;
where SEARCH is a regex and REPLACE is (in the
absence of the /e modifier) a double-quote interpolated
string (unless the delimiters are ' single quotes).
so the replacement string /9{1,5}/ would be a literal
'9{1,5}' - probably not what is wanted. the '{1,5}' part
has no special meta-meaning when interpolated in a
double-quoted string; it is not some kind of quantifier.

see: 'Regexp Quote-like Operators' in perlop; perlre;
perlrequick.

hth -- bill walters
<BR><BR>**************<BR>Remember Mom this Mother's Day! Find a florist near you now.
(http://yellowpages.aol.com/search?query=florist&ncid=em lcntusyelp00000006)</HTML>

--part1_c23.5effad00.3735cff6_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<HTML><FONT FACE=3Darial,helvetica><FONT SIZE=3D2 PTSIZE=3D10>hi deane --=
  
<BR>
<BR>In a message dated 5/8/2009 12:31:27 PM Eastern Standard Time, zmumba [at] =
yahoo.com writes:
<BR>
<BR>> > for ( [at] slashes) {
<BR>> >    $_ =3D~ s/\/{1,5}/9{1,5}/g;
<BR>> > }
<BR>> >
<BR>> > One thing I'm not certain about is whether the {1,5} is
<BR>> > even necessary--or
<BR>> > if it will DWIM, since you're doing a global
<BR>> > substitution. Better might be
<BR>> > just:
<BR>> >
<BR>> > for ( [at] slashes) {
<BR>> >    $_ =3D~ s/\//9/g;
<BR>> > }
<BR>
<BR>the invocation of  s///  is  s/SEARCH/REPLACE/modifiers=
;  
<BR>where  SEARCH  is a regex and  REPLACE  is (in the=

<BR>absence of the  /e  modifier) a double-quote interpolated
<BR>string (unless the delimiters are  '  single quotes).  =
 
<BR>so the replacement string  /9{1,5}/  would be a literal
<BR>'9{1,5}'  -  probably not what is wanted.   the &n=
bsp;'{1,5}'  part
<BR>has no special meta-meaning when interpolated in a
<BR>double-quoted string; it is not some kind of quantifier.   
<BR>
<BR>see: 'Regexp Quote-like Operators' in perlop; perlre;
<BR>perlrequick.
<BR>
<BR>hth -- bill walters   
<BR></FONT><BR><BR>**************<BR>Remember Mom this Mother's Day! Find=
a florist near you now. (http://yellowpages.aol.com/search?query=3Dfloris=
t&ncid=3Demlcntusyelp00000006)</HTML>

--part1_c23.5effad00.3735cff6_boundary--

--============== 36614742==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--============== 36614742==--
Williamawalters [ Fr, 08 Mai 2009 20:12 ] [ ID #2000637 ]

Upgrading Active Perl from 5.8 to 5.10 and upgrading PDK 5.3 to 8.0

This is a multi-part message in MIME format.

--===============1380702614==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C9D8D3.EBC22130"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C9D8D3.EBC22130
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello! I am getting the following error when I use the perlapp for 8.0.
"This application has failed to start because perl58.dll was not found.
Re-installing the application may fix this problem.". This is what I
see in dos when I run the perlapp command.

#### test.pl ########
PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights reserved.
Standard license for David Fish <david.fish [at] marriott.com>

Can't load 'C:/Perl/site/lib/auto/Crypt/Blowfish/Blowfish.dll' for
module Crypt:
:Blowfish: load_file:The specified module could not be found at
/<C:\Program Fil
es\ActiveState Perl Dev Kit 8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm
line 217.
at test.pl line 129
Compilation failed in require at test.pl line 129.
BEGIN failed--compilation aborted at test.pl line 129.
'test.pl' had compilation errors.

#### test2.pl #########
PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights reserved.
Standard license for David Fish <david.fish [at] marriott.com>

Can't load 'C:/Perl/site/lib/auto/Date/Calc/Calc.dll' for module
Date::Calc: loa
d_file:The specified module could not be found at /<C:\Program
Files\ActiveState
Perl Dev Kit 8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.
at test2.pl line 111
Compilation failed in require at test2.pl line 111.
BEGIN failed--compilation aborted at test2.pl line 111.
'test2.pl' had compilation errors.
#######################

When I did the unistall of 5.8 and reinstall of 5.10 I did not remove
the c:\perl directory. I know that all the items I pulled down with ppm
are in perl/site/lib folder and it seems those are the .dll it is
failing on. Will I need to redownload those libraries even though I
type ppm and they are all shown active.

Also, there was no uninstall for 5.3 so I had to move the 5.3 related
files out of the way. I did not check if it was overwritten with the
upgrade to 8.0.

Thanks for any assistance with this.



David Fish
Senior Systems Analyst
Property Systems Services
Work (301) 380-3331
Fax (301) 644-7521
BlackBerry (301) 646-8985
david.fish [at] marriott.com

This communication contains information from Marriott International,
Inc. that may be confidential. Except for personal use by the intended
recipient, or as expressly authorized by the sender, any person who
receives this information is prohibited from disclosing, copying,
distributing, and/or using it. If you have received this communication
in error, please immediately delete it and all copies, and promptly
notify the sender. Nothing in this communication is intended to operate
as an electronic signature under applicable law.





________________________________

From: activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of A
Smith
Sent: Friday, May 08, 2009 2:11 PM
To: zmumba [at] yahoo.com
Cc: activeperl [at] listserv.activestate.com
Subject: Re: search and replace
=09
=09
My understanding with Perl as well as my editor of choice ViM or
gvim, and other tools, is to use a character not in your search or
replace set as your pattern delimiter rather than /, such as # or !. It
makes your code much more readable.
=09
--
Andrew in Edinburgh
=09
=09
2009/5/8 zilore mumba <zmumba [at] yahoo.com>
=09


Hello Perl community,
Once more excuse me for asking something very basic. I
have a file which has five-digit strings. Some of the groups may
contains from one to five slashes, as below.
///// ///// 92765 15426 679// 28011 10660 831//
=09
In the code below I am reading from file1, replacing
every occurence of / by 9 and rewriting the strings in file2, and
deleting original file1. I am getting an error as "use of uninitialised
value is substitution s///" indicating the error is on the line with
"$slashes =3D~ s/\/{1,5}/9{1,5}/g;".
=09
am working on Windows with Cygwin.
=09
My reading of the literature does not yield any
solution. Assistance will be appreciated.
=09
Zilore.
=09
#!/usr/bin/perl --
=09
use strict;
use warnings;
use POSIX;
use File::Path;
use File::Copy;
=09
# Variable declaration
my $debug =3D 1;
=09
my $file1 =3D "file1.txt";
print "file1=3D'$file1'\n" if $debug;
my $file2 =3D "file2.txt";
print "file2=3D'$file2'\n" if $debug;
=09
my [at] slashes;
my $slashes;
=09
open (OUT1, "<$file1") or die "open '$file1: failed
$! ($^E)";
open (OUT2, ">$file2") or die "open '$file2: failed
$! ($^E)";
[at] slashes =3D <OUT1>;
close OUT1;
=09
for my $i ( [at] slashes) {
$slashes =3D~ s/\/{1,5}/9{1,5}/g;
}
=09
print OUT2 " [at] slashes";
close OUT2;
=09
unlink $file1 or die "Failed to delede $file1: $!\n";
=09
__END__
=09
=09
=09
=09
=09
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe:
http://listserv.ActiveState.com/mailman/mysubs
=09



------_=_NextPart_001_01C9D8D3.EBC22130
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.3527" name=3DGENERATOR></HEAD>
<BODY>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D747443422-19052009><FONT =
face=3DArial
color=3D#0000ff size=3D2>Hello!  I am getting the following error =
when I use
the perlapp for 8.0.  "This application has failed to start because =

perl58.dll was not found.  Re-installing the application may fix =
this
problem.".  This is what I see in dos when I run the perlapp
command.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D747443422-19052009><FONT =
face=3DArial
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D747443422-19052009>####
test.pl ########</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>PerlApp 8.0.1 build
289861<BR>Copyright (C) 1998-2009 ActiveState Software Inc. All rights
reserved.<BR>Standard license for David Fish <<A
href=3D"mailto:david.fish [at] marriott.com">david.fish [at] marriott. com</A>></=
FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>Can't load
'C:/Perl/site/lib/auto/Crypt/Blowfish/Blowfish.dll' for module
Crypt:<BR>:Blowfish: load_file:The specified module could not be found =
at
/<C:\Program Fil<BR>es\ActiveState Perl Dev Kit
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line =
217.<BR> at <SPAN
class=3D747443422-19052009>test.pl</SPAN> line 129<BR>Compilation failed =
in
require at <SPAN class=3D747443422-19052009>test.</SPAN>pl line
129.</FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN
class=3D747443422-19052009>B</SPAN>EGIN failed--compilation aborted =
at <SPAN
class=3D747443422-19052009>test.</SPAN>pl line 129.<BR>'<SPAN
class=3D747443422-19052009>test</SPAN>.pl' had compilation
errors.</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN
class=3D747443422-19052009></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D747443422-19052009>####
test2.pl #########</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN
class=3D747443422-19052009>PerlApp 8.0.1 build 289861<BR>Copyright (C) =
1998-2009
ActiveState Software Inc. All rights reserved.<BR>Standard license for =
David
Fish <<A
href=3D"mailto:david.fish [at] marriott.com">david.fish [at] marriott. com</A>></=
SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D747443422-19052009>Can't
load 'C:/Perl/site/lib/auto/Date/Calc/Calc.dll' for module Date::Calc:
loa<BR>d_file:The specified module could not be found at /<C:\Program =

Files\ActiveState<BR> Perl Dev Kit
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.<BR> at =
test2.pl line
111<BR>Compilation failed in require at test2.pl line 111.<BR>BEGIN
failed--compilation aborted at test2.pl line 111.<BR>'test2.pl' had =
compilation
errors.<BR>#######################</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><SPAN class=3D747443422-19052009><FONT face=3DArial color=3D#0000ff =
size=3D2>When I
did the unistall of 5.8 and reinstall of 5.10 I did not remove the =
c:\perl
directory.  I know that all the items I pulled down with ppm are in =

perl/site/lib folder and it seems those are the .dll it is failing =
on. 
Will I need to redownload those libraries even though I type ppm and =
they are
all shown active.</FONT></SPAN></DIV>
<DIV><SPAN class=3D747443422-19052009><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D747443422-19052009><FONT face=3DArial color=3D#0000ff =
size=3D2>Also,
there was no uninstall for 5.3 so I had to move the 5.3 related files =
out of the
way.   I did not check if it was overwritten with the upgrade =
to
8.0.</FONT></SPAN></DIV>
<DIV><SPAN class=3D747443422-19052009><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D747443422-19052009><FONT face=3DArial color=3D#0000ff =
size=3D2>Thanks
for any assistance with this.</FONT></SPAN></DIV>
<DIV><FONT face=3DArial><BR><FONT color=3D#0000ff =
size=3D2></FONT></FONT></DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=3Den-us><FONT face=3DArial size=3D2>David =
Fish</FONT></SPAN> <BR><SPAN
lang=3Den-us><FONT face=3DArial size=3D2>Senior Systems =
Analyst</FONT></SPAN>
<BR><SPAN lang=3Den-us><FONT face=3DArial size=3D2>Property Systems
Services</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial =
size=3D2>Work (301)
380-3331</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial =
size=3D2>Fax (301)
644-7521</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial =
size=3D2>BlackBerry
(301) 646-8985</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial
size=3D2>david.fish [at] marriott.com</FONT></SPAN> </P>
<P><SPAN lang=3Den-us><FONT face=3DArial color=3D#000000 size=3D1>This =
communication
contains information from Marriott International, Inc. that may be =
confidential.
Except for personal use by the intended recipient, or as expressly =
authorized by
the sender, any person who receives this information is prohibited from
disclosing, copying, distributing, and/or using it. If you have received =
this
communication in error, please immediately delete it and all copies, and =

promptly notify the sender. Nothing in this communication is intended to =
operate
as an electronic signature under applicable law.</FONT></SPAN></P><BR>
<DIV> </DIV><BR>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B>
activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] <B>On Behalf Of =
</B>A
Smith<BR><B>Sent:</B> Friday, May 08, 2009 2:11 PM<BR><B>To:</B>
zmumba [at] yahoo.com<BR><B>Cc:</B>
activeperl [at] listserv.activestate.com<BR><B>Subject:</B> Re: search and
replace<BR></FONT><BR></DIV>
<DIV></DIV>My understanding with Perl as well as my editor of choice =
ViM or
gvim, and other tools,  is to use a character not in your =
search  or
replace set  as your pattern delimiter rather than /, such as # =
or !. It
makes your code much more readable.<BR><BR>--<BR>Andrew in =
Edinburgh<BR><BR>
<DIV class=3Dgmail_quote>2009/5/8 zilore mumba <SPAN dir=3Dltr><<A
href=3D"mailto:zmumba [at] yahoo.com">zmumba [at] yahoo.com</A>></SPAN><BR>
<BLOCKQUOTE class=3Dgmail_quote
style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: =
rgb(204,204,204) 1px solid"><BR>Hello
Perl community,<BR>Once more excuse me for asking something very =
basic. I
have a file which has five-digit strings. Some of the groups may =
contains
from one to five slashes, as below.<BR>///// ///// 92765 15426 679// =
28011
10660 831//<BR><BR>In the code below I am reading from file1, =
replacing
every occurence of / by 9 and rewriting the strings in file2, and =
deleting
original file1. I am getting an error as "use of uninitialised value =
is
substitution s///" indicating the error is on the line with =
"$slashes =3D~
s/\/{1,5}/9{1,5}/g;".<BR><BR>am working on Windows with =
Cygwin.<BR><BR>My
reading of the literature does not yield any solution. Assistance =
will be
appreciated.<BR><BR>Zilore.<BR><BR>#!/usr/bin/perl --<BR><BR>use
strict;<BR>use warnings;<BR>use POSIX;<BR>use File::Path;<BR>use
File::Copy;<BR><BR># Variable declaration<BR>my $debug =3D =
1;<BR><BR>my $file1
=3D "file1.txt";<BR>print "file1=3D'$file1'\n" if $debug;<BR>my =
$file2 =3D
"file2.txt";<BR>print "file2=3D'$file2'\n" if $debug;<BR><BR>  =
 my
[at] slashes;<BR>   my $slashes;<BR><BR>   open =
(OUT1,
"<$file1") or die "open '$file1: failed $! ($^E)";<BR>  =
 open
(OUT2, ">$file2") or die "open '$file2: failed $! =
($^E)";<BR> 
      [at] slashes =3D <OUT1>;<BR>   close =

OUT1;<BR><BR>for my $i ( [at] slashes) {<BR>  $slashes =3D~
s/\/{1,5}/9{1,5}/g;<BR>  }<BR><BR>print OUT2 =
" [at] slashes";<BR>close
OUT2;<BR><BR>unlink $file1 or die "Failed to delede $file1:
=
$!\n";<BR><BR>__END__<BR><BR><BR><BR><BR><BR>____________________________=
___________________<BR>ActivePerl
mailing list<BR><A
=
href=3D"mailto:ActivePerl [at] listserv.ActiveState.com">ActivePe rl [at] listserv.A=
ctiveState.com</A><BR>To
unsubscribe: <A =
href=3D"http://listserv.ActiveState.com/mailman/mysubs"
=
target=3D_blank>http://listserv.ActiveState.com/mailman/mysu bs</A><BR></B=
LOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C9D8D3.EBC22130--

--===============1380702614==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1380702614==--
David.Fish [ Mi, 20 Mai 2009 00:48 ] [ ID #2001923 ]

RE: Upgrading Active Perl from 5.8 to 5.10 and upgrading PDK 5.3 to

This is a multi-part message in MIME format.

--===============0199814030==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_01F8_01C9D89E.2FA9F670"
Content-Language: en-us

This is a multi-part message in MIME format.

------=_NextPart_000_01F8_01C9D89E.2FA9F670
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Installing Perl 5.10 on top of a 5.8 installation is not supported. It is best to install into a clean tree and then reinstall the
PPM modules because the 5.8 versions are not binary compatible with 5.10.



Cheers,

-Jan



From: activeperl-bounces [at] listserv.ActiveState.com [mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of Fish, David
Sent: Tuesday, May 19, 2009 3:48 PM
To: activeperl [at] listserv.activestate.com
Subject: Upgrading Active Perl from 5.8 to 5.10 and upgrading PDK 5.3 to 8.0



Hello! I am getting the following error when I use the perlapp for 8.0. "This application has failed to start because perl58.dll
was not found. Re-installing the application may fix this problem.". This is what I see in dos when I run the perlapp command.



#### test.pl ########

PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights reserved.
Standard license for David Fish <david.fish [at] marriott.com>



Can't load 'C:/Perl/site/lib/auto/Crypt/Blowfish/Blowfish.dll' for module Crypt:
:Blowfish: load_file:The specified module could not be found at /<C:\Program Fil
es\ActiveState Perl Dev Kit 8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.
at test.pl line 129
Compilation failed in require at test.pl line 129.

BEGIN failed--compilation aborted at test.pl line 129.
'test.pl' had compilation errors.



#### test2.pl #########

PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights reserved.
Standard license for David Fish <david.fish [at] marriott.com>



Can't load 'C:/Perl/site/lib/auto/Date/Calc/Calc.dll' for module Date::Calc: loa
d_file:The specified module could not be found at /<C:\Program Files\ActiveState
Perl Dev Kit 8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.
at test2.pl line 111
Compilation failed in require at test2.pl line 111.
BEGIN failed--compilation aborted at test2.pl line 111.
'test2.pl' had compilation errors.
#######################



When I did the unistall of 5.8 and reinstall of 5.10 I did not remove the c:\perl directory. I know that all the items I pulled
down with ppm are in perl/site/lib folder and it seems those are the .dll it is failing on. Will I need to redownload those
libraries even though I type ppm and they are all shown active.



Also, there was no uninstall for 5.3 so I had to move the 5.3 related files out of the way. I did not check if it was overwritten
with the upgrade to 8.0.



Thanks for any assistance with this.



David Fish
Senior Systems Analyst
Property Systems Services
Work (301) 380-3331
Fax (301) 644-7521
BlackBerry (301) 646-8985
david.fish [at] marriott.com

This communication contains information from Marriott International, Inc. that may be confidential. Except for personal use by the
intended recipient, or as expressly authorized by the sender, any person who receives this information is prohibited from
disclosing, copying, distributing, and/or using it. If you have received this communication in error, please immediately delete it
and all copies, and promptly notify the sender. Nothing in this communication is intended to operate as an electronic signature
under applicable law.







_____

From: activeperl-bounces [at] listserv.ActiveState.com [mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of A Smith
Sent: Friday, May 08, 2009 2:11 PM
To: zmumba [at] yahoo.com
Cc: activeperl [at] listserv.activestate.com
Subject: Re: search and replace

My understanding with Perl as well as my editor of choice ViM or gvim, and other tools, is to use a character not in your search
or replace set as your pattern delimiter rather than /, such as # or !. It makes your code much more readable.

--
Andrew in Edinburgh

2009/5/8 zilore mumba <zmumba [at] yahoo.com>


Hello Perl community,
Once more excuse me for asking something very basic. I have a file which has five-digit strings. Some of the groups may contains
from one to five slashes, as below.
///// ///// 92765 15426 679// 28011 10660 831//

In the code below I am reading from file1, replacing every occurence of / by 9 and rewriting the strings in file2, and deleting
original file1. I am getting an error as "use of uninitialised value is substitution s///" indicating the error is on the line with
"$slashes =~ s/\/{1,5}/9{1,5}/g;".

am working on Windows with Cygwin.

My reading of the literature does not yield any solution. Assistance will be appreciated.

Zilore.

#!/usr/bin/perl --

use strict;
use warnings;
use POSIX;
use File::Path;
use File::Copy;

# Variable declaration
my $debug = 1;

my $file1 = "file1.txt";
print "file1='$file1'\n" if $debug;
my $file2 = "file2.txt";
print "file2='$file2'\n" if $debug;

my [at] slashes;
my $slashes;

open (OUT1, "<$file1") or die "open '$file1: failed $! ($^E)";
open (OUT2, ">$file2") or die "open '$file2: failed $! ($^E)";
[at] slashes = <OUT1>;
close OUT1;

for my $i ( [at] slashes) {
$slashes =~ s/\/{1,5}/9{1,5}/g;
}

print OUT2 " [at] slashes";
close OUT2;

unlink $file1 or die "Failed to delede $file1: $!\n";

__END__





_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs




------=_NextPart_000_01F8_01C9D89E.2FA9F670
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
[at] font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
..MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Installing Perl 5.10 on top of a 5.8 installation is not
supported.  It is best to install into a clean tree and then =
reinstall the PPM
modules because the 5.8 versions are not binary compatible with =
5.10.<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'><o:p> </o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Cheers,<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>-Jan<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'><o:p> </o:p></span></p>

<div style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in =
0in 4.0pt'>

<div>

<div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt =
0in 0in 0in'>

<p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >From:</span>=
</b><span
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' > =
activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] <b>On Behalf Of =
</b>Fish,
David<br>
<b>Sent:</b> Tuesday, May 19, 2009 3:48 PM<br>
<b>To:</b> activeperl [at] listserv.activestate.com<br>
<b>Subject:</b> Upgrading Active Perl from 5.8 to 5.10 and upgrading PDK =
5.3 to
8.0<o:p></o:p></span></p>

</div>

</div>

<p class=3DMsoNormal><o:p> </o:p></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>Hello!  I am getting the following error when I use the
perlapp for 8.0.  "This application has failed to start =
because
perl58.dll was not found.  Re-installing the application may fix =
this
problem.".  This is what I see in dos when I run the perlapp =
command.</span><o:p></o:p></p>

<p class=3DMsoNormal> <o:p></o:p></p>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>#### test.pl ########</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>PerlApp 8.0.1 build 289861<br>
Copyright (C) 1998-2009 ActiveState Software Inc. All rights =
reserved.<br>
Standard license for David Fish <<a =
href=3D"mailto:david.fish [at] marriott.com">david.fish [at] marriott. com</a>></=
span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>Can't load =
'C:/Perl/site/lib/auto/Crypt/Blowfish/Blowfish.dll' for
module Crypt:<br>
:Blowfish: load_file:The specified module could not be found at =
/<C:\Program
Fil<br>
es\ActiveState Perl Dev Kit 8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm =
line
217.<br>
 at test.pl line 129<br>
Compilation failed in require at test.pl line =
129.</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>BEGIN failed--compilation aborted at test.pl line =
129.<br>
'test.pl' had compilation errors.</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>#### test2.pl #########</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>PerlApp 8.0.1 build 289861<br>
Copyright (C) 1998-2009 ActiveState Software Inc. All rights =
reserved.<br>
Standard license for David Fish <<a =
href=3D"mailto:david.fish [at] marriott.com">david.fish [at] marriott. com</a>></=
span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>Can't load 'C:/Perl/site/lib/auto/Date/Calc/Calc.dll' for =
module
Date::Calc: loa<br>
d_file:The specified module could not be found at /<C:\Program =
Files\ActiveState<br>
 Perl Dev Kit 8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line =
217.<br>
 at test2.pl line 111<br>
Compilation failed in require at test2.pl line 111.<br>
BEGIN failed--compilation aborted at test2.pl line 111.<br>
'test2.pl' had compilation errors.<br>
#######################</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>When I did the unistall of 5.8 and reinstall of 5.10 I did =
not
remove the c:\perl directory.  I know that all the items I pulled =
down
with ppm are in perl/site/lib folder and it seems those are the .dll it =
is
failing on.  Will I need to redownload those libraries even though =
I type
ppm and they are all shown active.</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>Also, there was no uninstall for 5.3 so I had to move the =
5.3
related files out of the way.   I did not check if it was =
overwritten
with the upgrade to 8.0.</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal> <o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>Thanks for any assistance with this.</span><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><o:p> </o:p></p>

</div>

<p><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> David =
Fish</span>
<br>
<span style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Senior =
Systems
Analyst</span> <br>
<span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> Property
Systems Services</span> <br>
<span style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Work =
(301)
380-3331</span> <br>
<span style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Fax =
(301)
644-7521</span> <br>
<span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> BlackBerry
(301) 646-8985</span> <br>
<span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> david.fish [at] ma=
rriott.com</span>
<o:p></o:p></p>

<p><span =
style=3D'font-size:7.5pt;font-family:"Arial","sans-serif";co lor:black'>Th=
is
communication contains information from Marriott International, Inc. =
that may
be confidential. Except for personal use by the intended recipient, or =
as
expressly authorized by the sender, any person who receives this =
information is
prohibited from disclosing, copying, distributing, and/or using it. If =
you have
received this communication in error, please immediately delete it and =
all
copies, and promptly notify the sender. Nothing in this communication is
intended to operate as an electronic signature under applicable =
law.</span><o:p></o:p></p>

<p class=3DMsoNormal><o:p> </o:p></p>

<div>

<p class=3DMsoNormal> <o:p></o:p></p>

</div>

<blockquote =
style=3D'margin-top:5.0pt;margin-right:0in;margin-bottom:5.0 pt'>

<p class=3DMsoNormal><o:p> </o:p></p>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'>

<hr size=3D2 width=3D"100%" align=3Dcenter>

</div>

<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><b><span =
style=3D'font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span =
style=3D'font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> =
activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] <b>On Behalf Of =
</b>A
Smith<br>
<b>Sent:</b> Friday, May 08, 2009 2:11 PM<br>
<b>To:</b> zmumba [at] yahoo.com<br>
<b>Cc:</b> activeperl [at] listserv.activestate.com<br>
<b>Subject:</b> Re: search and replace</span><o:p></o:p></p>

<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'>My understanding =
with Perl as
well as my editor of choice ViM or gvim, and other tools,  is to =
use a
character not in your search  or replace set  as your pattern
delimiter rather than /, such as # or !. It makes your code much more =
readable.<br>
<br>
--<br>
Andrew in Edinburgh<o:p></o:p></p>

<div>

<p class=3DMsoNormal>2009/5/8 zilore mumba <<a =
href=3D"mailto:zmumba [at] yahoo.com">zmumba [at] yahoo.com</a>><o:p></o:p></p>

<p class=3DMsoNormal><br>
Hello Perl community,<br>
Once more excuse me for asking something very basic. I have a file which =
has
five-digit strings. Some of the groups may contains from one to five =
slashes,
as below.<br>
///// ///// 92765 15426 679// 28011 10660 831//<br>
<br>
In the code below I am reading from file1, replacing every occurence of =
/ by 9
and rewriting the strings in file2, and deleting original file1. I am =
getting
an error as "use of uninitialised value is substitution s///"
indicating the error is on the line with "$slashes =3D~
s/\/{1,5}/9{1,5}/g;".<br>
<br>
am working on Windows with Cygwin.<br>
<br>
My reading of the literature does not yield any solution. Assistance =
will be
appreciated.<br>
<br>
Zilore.<br>
<br>
#!/usr/bin/perl --<br>
<br>
use strict;<br>
use warnings;<br>
use POSIX;<br>
use File::Path;<br>
use File::Copy;<br>
<br>
# Variable declaration<br>
my $debug =3D 1;<br>
<br>
my $file1 =3D "file1.txt";<br>
print "file1=3D'$file1'\n" if $debug;<br>
my $file2 =3D "file2.txt";<br>
print "file2=3D'$file2'\n" if $debug;<br>
<br>
   my [at] slashes;<br>
   my $slashes;<br>
<br>
   open (OUT1, "<$file1") or die "open =
'$file1:
failed $! ($^E)";<br>
   open (OUT2, ">$file2") or die "open =
'$file2:
failed $! ($^E)";<br>
        [at] slashes =3D <OUT1>;<br>
   close OUT1;<br>
<br>
for my $i ( [at] slashes) {<br>
  $slashes =3D~ s/\/{1,5}/9{1,5}/g;<br>
  }<br>
<br>
print OUT2 " [at] slashes";<br>
close OUT2;<br>
<br>
unlink $file1 or die "Failed to delede $file1: $!\n";<br>
<br>
__END__<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
ActivePerl mailing list<br>
<a =
href=3D"mailto:ActivePerl [at] listserv.ActiveState.com">ActivePe rl [at] listserv.A=
ctiveState.com</a><br>
To unsubscribe: <a =
href=3D"http://listserv.ActiveState.com/mailman/mysubs"
target=3D"_blank">http://listserv.ActiveState.com/mailman/my subs</a><o:p>=
</o:p></p>

</div>

<p class=3DMsoNormal><o:p> </o:p></p>

</blockquote>

</div>

</div>

</body>

</html>

------=_NextPart_000_01F8_01C9D89E.2FA9F670--


--===============0199814030==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0199814030==--
Jan Dubois [ Mi, 20 Mai 2009 01:23 ] [ ID #2001924 ]

RE: Upgrading Active Perl from 5.8 to 5.10 and upgrading PDK 5.3 to

This is a multi-part message in MIME format.

--============== 98128270==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C9D948.7A8C93A0"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C9D948.7A8C93A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Thanks! That is what I was going to try today. I will reply with the
results.



David Fish
Senior Systems Analyst
Property Systems Services
Work (301) 380-3331
Fax (301) 644-7521
BlackBerry (301) 646-8985
david.fish [at] marriott.com

This communication contains information from Marriott International,
Inc. that may be confidential. Except for personal use by the intended
recipient, or as expressly authorized by the sender, any person who
receives this information is prohibited from disclosing, copying,
distributing, and/or using it. If you have received this communication
in error, please immediately delete it and all copies, and promptly
notify the sender. Nothing in this communication is intended to operate
as an electronic signature under applicable law.





________________________________

From: Jan Dubois [mailto:jand [at] activestate.com]
Sent: Tuesday, May 19, 2009 7:24 PM
To: Fish, David; activeperl [at] listserv.activestate.com
Subject: RE: Upgrading Active Perl from 5.8 to 5.10 and
upgrading PDK 5.3 to 8.0
=09
=09

Installing Perl 5.10 on top of a 5.8 installation is not
supported. It is best to install into a clean tree and then reinstall
the PPM modules because the 5.8 versions are not binary compatible with
5.10.



Cheers,

-Jan



From: activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of Fish,
David
Sent: Tuesday, May 19, 2009 3:48 PM
To: activeperl [at] listserv.activestate.com
Subject: Upgrading Active Perl from 5.8 to 5.10 and upgrading
PDK 5.3 to 8.0



Hello! I am getting the following error when I use the perlapp
for 8.0. "This application has failed to start because perl58.dll was
not found. Re-installing the application may fix this problem.". This
is what I see in dos when I run the perlapp command.



#### test.pl ########

PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights
reserved.
Standard license for David Fish <david.fish [at] marriott.com>



Can't load 'C:/Perl/site/lib/auto/Crypt/Blowfish/Blowfish.dll'
for module Crypt:
:Blowfish: load_file:The specified module could not be found at
/<C:\Program Fil
es\ActiveState Perl Dev Kit
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.
at test.pl line 129
Compilation failed in require at test.pl line 129.

BEGIN failed--compilation aborted at test.pl line 129.
'test.pl' had compilation errors.



#### test2.pl #########

PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights
reserved.
Standard license for David Fish <david.fish [at] marriott.com>



Can't load 'C:/Perl/site/lib/auto/Date/Calc/Calc.dll' for module
Date::Calc: loa
d_file:The specified module could not be found at /<C:\Program
Files\ActiveState
Perl Dev Kit 8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.
at test2.pl line 111
Compilation failed in require at test2.pl line 111.
BEGIN failed--compilation aborted at test2.pl line 111.
'test2.pl' had compilation errors.
#######################



When I did the unistall of 5.8 and reinstall of 5.10 I did not
remove the c:\perl directory. I know that all the items I pulled down
with ppm are in perl/site/lib folder and it seems those are the .dll it
is failing on. Will I need to redownload those libraries even though I
type ppm and they are all shown active.



Also, there was no uninstall for 5.3 so I had to move the 5.3
related files out of the way. I did not check if it was overwritten
with the upgrade to 8.0.



Thanks for any assistance with this.



David Fish
Senior Systems Analyst
Property Systems Services
Work (301) 380-3331
Fax (301) 644-7521
BlackBerry (301) 646-8985
david.fish [at] marriott.com

This communication contains information from Marriott
International, Inc. that may be confidential. Except for personal use by
the intended recipient, or as expressly authorized by the sender, any
person who receives this information is prohibited from disclosing,
copying, distributing, and/or using it. If you have received this
communication in error, please immediately delete it and all copies, and
promptly notify the sender. Nothing in this communication is intended to
operate as an electronic signature under applicable law.







________________________________

From: activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of A
Smith
Sent: Friday, May 08, 2009 2:11 PM
To: zmumba [at] yahoo.com
Cc: activeperl [at] listserv.activestate.com
Subject: Re: search and replace

My understanding with Perl as well as my editor of
choice ViM or gvim, and other tools, is to use a character not in your
search or replace set as your pattern delimiter rather than /, such as
# or !. It makes your code much more readable.
=09
--
Andrew in Edinburgh

2009/5/8 zilore mumba <zmumba [at] yahoo.com>

=09
Hello Perl community,
Once more excuse me for asking something very basic. I
have a file which has five-digit strings. Some of the groups may
contains from one to five slashes, as below.
///// ///// 92765 15426 679// 28011 10660 831//
=09
In the code below I am reading from file1, replacing
every occurence of / by 9 and rewriting the strings in file2, and
deleting original file1. I am getting an error as "use of uninitialised
value is substitution s///" indicating the error is on the line with
"$slashes =3D~ s/\/{1,5}/9{1,5}/g;".
=09
am working on Windows with Cygwin.
=09
My reading of the literature does not yield any
solution. Assistance will be appreciated.
=09
Zilore.
=09
#!/usr/bin/perl --
=09
use strict;
use warnings;
use POSIX;
use File::Path;
use File::Copy;
=09
# Variable declaration
my $debug =3D 1;
=09
my $file1 =3D "file1.txt";
print "file1=3D'$file1'\n" if $debug;
my $file2 =3D "file2.txt";
print "file2=3D'$file2'\n" if $debug;
=09
my [at] slashes;
my $slashes;
=09
open (OUT1, "<$file1") or die "open '$file1: failed
$! ($^E)";
open (OUT2, ">$file2") or die "open '$file2: failed
$! ($^E)";
[at] slashes =3D <OUT1>;
close OUT1;
=09
for my $i ( [at] slashes) {
$slashes =3D~ s/\/{1,5}/9{1,5}/g;
}
=09
print OUT2 " [at] slashes";
close OUT2;
=09
unlink $file1 or die "Failed to delede $file1: $!\n";
=09
__END__
=09
=09
=09
=09
=09
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe:
http://listserv.ActiveState.com/mailman/mysubs




------_=_NextPart_001_01C9D948.7A8C93A0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D
"urn:schemas-microsoft-com:vml" xmlns:o =3D
"urn:schemas-microsoft-com:office:office" xmlns:w =3D
"urn:schemas-microsoft-com:office:word" xmlns:m =3D
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.3527" name=3DGENERATOR><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
..shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE> [at] font-face {
font-family: Cambria Math;
}
[at] font-face {
font-family: Calibri;
}
[at] font-face {
font-family: Tahoma;
}
[at] page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New =
Roman","serif"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New =
Roman","serif"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New =
Roman","serif"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P {
FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: =
"Times New Roman","serif"; mso-style-priority: 99; mso-margin-top-alt: =
auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: =
personal-reply
}
..MsoChpDefault {
FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D312074212-20052009><FONT =
face=3DArial
color=3D#0000ff size=3D2>Thanks!  That is what I was going to try =
today. 
I will reply with the results.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN =
class=3D312074212-20052009></SPAN> </DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=3Den-us><FONT face=3DArial size=3D2>David =
Fish</FONT></SPAN> <BR><SPAN
lang=3Den-us><FONT face=3DArial size=3D2>Senior Systems =
Analyst</FONT></SPAN>
<BR><SPAN lang=3Den-us><FONT face=3DArial size=3D2>Property Systems
Services</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial =
size=3D2>Work (301)
380-3331</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial =
size=3D2>Fax (301)
644-7521</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial =
size=3D2>BlackBerry
(301) 646-8985</FONT></SPAN> <BR><SPAN lang=3Den-us><FONT face=3DArial
size=3D2>david.fish [at] marriott.com</FONT></SPAN> </P>
<P><SPAN lang=3Den-us><FONT face=3DArial color=3D#000000 size=3D1>This =
communication
contains information from Marriott International, Inc. that may be =
confidential.
Except for personal use by the intended recipient, or as expressly =
authorized by
the sender, any person who receives this information is prohibited from
disclosing, copying, distributing, and/or using it. If you have received =
this
communication in error, please immediately delete it and all copies, and =

promptly notify the sender. Nothing in this communication is intended to =
operate
as an electronic signature under applicable law.</FONT></SPAN></P><BR>
<DIV> </DIV><BR>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> Jan Dubois =
[mailto:jand [at] activestate.com]
<BR><B>Sent:</B> Tuesday, May 19, 2009 7:24 PM<BR><B>To:</B> Fish, =
David;
activeperl [at] listserv.activestate.com<BR><B>Subject:</B> RE: Upgrading =
Active
Perl from 5.8 to 5.10 and upgrading PDK 5.3 to =
8.0<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'">Installing
Perl 5.10 on top of a 5.8 installation is not supported.  It is =
best to
install into a clean tree and then reinstall the PPM modules because =
the 5.8
versions are not binary compatible with 5.10.<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'">Cheers,<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'">-Jan<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<DIV
style=3D"BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: =
medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: blue =
1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<DIV>
<DIV
style=3D"BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: =
#b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: =
medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=3DMsoNormal><B><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Tahoma','sans-serif'">From:</SPAN></B><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">
activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] <B>On Behalf Of =
</B>Fish,
David<BR><B>Sent:</B> Tuesday, May 19, 2009 3:48 PM<BR><B>To:</B>
activeperl [at] listserv.activestate.com<BR><B>Subject:</B> Upgrading =
Active Perl
from 5.8 to 5.10 and upgrading PDK 5.3 to
8.0<o:p></o:p></SPAN></P></DIV></DIV>
<P class=3DMsoNormal><o:p> </o:p></P>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Hello! 
I am getting the following error when I use the perlapp for 8.0.  =
"This
application has failed to start because perl58.dll was not =
found. 
Re-installing the application may fix this problem.".  This is =
what I see
in dos when I run the perlapp command.</SPAN><o:p></o:p></P>
<P class=3DMsoNormal> <o:p></o:p></P>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">####
test.pl ########</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">PerlApp
8.0.1 build 289861<BR>Copyright (C) 1998-2009 ActiveState Software =
Inc. All
rights reserved.<BR>Standard license for David Fish <<A
=
href=3D"mailto:david.fish [at] marriott.com">david.fish [at] marriott. com</A>></=
SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Can't
load 'C:/Perl/site/lib/auto/Crypt/Blowfish/Blowfish.dll' for module
Crypt:<BR>:Blowfish: load_file:The specified module could not be found =
at
/<C:\Program Fil<BR>es\ActiveState Perl Dev Kit
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line =
217.<BR> at test.pl
line 129<BR>Compilation failed in require at test.pl line
129.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">BEGIN
failed--compilation aborted at test.pl line 129.<BR>'test.pl' had =

compilation errors.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">####
test2.pl #########</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">PerlApp
8.0.1 build 289861<BR>Copyright (C) 1998-2009 ActiveState Software =
Inc. All
rights reserved.<BR>Standard license for David Fish <<A
=
href=3D"mailto:david.fish [at] marriott.com">david.fish [at] marriott. com</A>></=
SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Can't
load 'C:/Perl/site/lib/auto/Date/Calc/Calc.dll' for module Date::Calc: =

loa<BR>d_file:The specified module could not be found at =
/<C:\Program
Files\ActiveState<BR> Perl Dev Kit
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.<BR> at =
test2.pl
line 111<BR>Compilation failed in require at test2.pl line =
111.<BR>BEGIN
failed--compilation aborted at test2.pl line 111.<BR>'test2.pl' had
compilation =
errors.<BR>#######################</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">When I
did the unistall of 5.8 and reinstall of 5.10 I did not remove the =
c:\perl
directory.  I know that all the items I pulled down with ppm are =
in
perl/site/lib folder and it seems those are the .dll it is failing =
on. 
Will I need to redownload those libraries even though I type ppm and =
they are
all shown active.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Also,
there was no uninstall for 5.3 so I had to move the 5.3 related files =
out of
the way.   I did not check if it was overwritten with the =
upgrade to
8.0.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><SPAN
style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Thanks
for any assistance with this.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><o:p> </o:p></P></DIV>
<P><SPAN style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Arial','sans-serif'">David
Fish</SPAN> <BR><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Senior =
Systems
Analyst</SPAN> <BR><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Property =
Systems
Services</SPAN> <BR><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Work =
(301)
380-3331</SPAN> <BR><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Fax (301) =

644-7521</SPAN> <BR><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Arial','sans-serif'">BlackBerry (301)
646-8985</SPAN> <BR><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Arial','sans-serif'">david.fish [at] marriott.com</SPAN>
<o:p></o:p></P>
<P><SPAN
style=3D"FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: =
'Arial','sans-serif'">This
communication contains information from Marriott International, Inc. =
that may
be confidential. Except for personal use by the intended recipient, or =
as
expressly authorized by the sender, any person who receives this =
information
is prohibited from disclosing, copying, distributing, and/or using it. =
If you
have received this communication in error, please immediately delete =
it and
all copies, and promptly notify the sender. Nothing in this =
communication is
intended to operate as an electronic signature under applicable
law.</SPAN><o:p></o:p></P>
<P class=3DMsoNormal><o:p> </o:p></P>
<DIV>
<P class=3DMsoNormal> <o:p></o:p></P></DIV>
<BLOCKQUOTE style=3D"MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt; =
MARGIN-RIGHT: 0in">
<P class=3DMsoNormal><o:p> </o:p></P>
<DIV class=3DMsoNormal style=3D"TEXT-ALIGN: center" align=3Dcenter>
<HR align=3Dcenter width=3D"100%" SIZE=3D2>
</DIV>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt"><B><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Tahoma','sans-serif'">From:</SPAN></B><SPAN
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">
activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] <B>On Behalf Of =
</B>A
Smith<BR><B>Sent:</B> Friday, May 08, 2009 2:11 PM<BR><B>To:</B>
zmumba [at] yahoo.com<BR><B>Cc:</B>
activeperl [at] listserv.activestate.com<BR><B>Subject:</B> Re: search =
and
replace</SPAN><o:p></o:p></P>
<P class=3DMsoNormal style=3D"MARGIN-BOTTOM: 12pt">My understanding =
with Perl as
well as my editor of choice ViM or gvim, and other tools,  is =
to use a
character not in your search  or replace set  as your =
pattern
delimiter rather than /, such as # or !. It makes your code much =
more
readable.<BR><BR>--<BR>Andrew in Edinburgh<o:p></o:p></P>
<DIV>
<P class=3DMsoNormal>2009/5/8 zilore mumba <<A
=
href=3D"mailto:zmumba [at] yahoo.com">zmumba [at] yahoo.com</A>><o:p></o:p></P>
<P class=3DMsoNormal><BR>Hello Perl community,<BR>Once more excuse =
me for
asking something very basic. I have a file which has five-digit =
strings.
Some of the groups may contains from one to five slashes, as =
below.<BR>/////
///// 92765 15426 679// 28011 10660 831//<BR><BR>In the code below I =
am
reading from file1, replacing every occurence of / by 9 and =
rewriting the
strings in file2, and deleting original file1. I am getting an error =
as "use
of uninitialised value is substitution s///" indicating the error is =
on the
line with "$slashes =3D~ s/\/{1,5}/9{1,5}/g;".<BR><BR>am working on =
Windows
with Cygwin.<BR><BR>My reading of the literature does not yield any
solution. Assistance will be
appreciated.<BR><BR>Zilore.<BR><BR>#!/usr/bin/perl --<BR><BR>use
strict;<BR>use warnings;<BR>use POSIX;<BR>use File::Path;<BR>use
File::Copy;<BR><BR># Variable declaration<BR>my $debug =3D =
1;<BR><BR>my $file1
=3D "file1.txt";<BR>print "file1=3D'$file1'\n" if $debug;<BR>my =
$file2 =3D
"file2.txt";<BR>print "file2=3D'$file2'\n" if $debug;<BR><BR>  =
 my
[at] slashes;<BR>   my $slashes;<BR><BR>   open =
(OUT1,
"<$file1") or die "open '$file1: failed $! ($^E)";<BR>  =
 open
(OUT2, ">$file2") or die "open '$file2: failed $! =
($^E)";<BR> 
      [at] slashes =3D <OUT1>;<BR>   close =

OUT1;<BR><BR>for my $i ( [at] slashes) {<BR>  $slashes =3D~
s/\/{1,5}/9{1,5}/g;<BR>  }<BR><BR>print OUT2 =
" [at] slashes";<BR>close
OUT2;<BR><BR>unlink $file1 or die "Failed to delede $file1:
=
$!\n";<BR><BR>__END__<BR><BR><BR><BR><BR><BR>____________________________=
___________________<BR>ActivePerl
mailing list<BR><A
=
href=3D"mailto:ActivePerl [at] listserv.ActiveState.com">ActivePe rl [at] listserv.A=
ctiveState.com</A><BR>To
unsubscribe: <A =
href=3D"http://listserv.ActiveState.com/mailman/mysubs"
=
target=3D_blank>http://listserv.ActiveState.com/mailman/mysu bs</A><o:p></=
o:p></P></DIV>
<P
class=3DMsoNormal><o:p> </o:p></P></BLOCKQUOTE></DIV></DIV></BLOCKQU=
OTE></BODY></HTML>

------_=_NextPart_001_01C9D948.7A8C93A0--

--============== 98128270==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--============== 98128270==--
David.Fish [ Mi, 20 Mai 2009 14:42 ] [ ID #2001925 ]
Perl » gmane.comp.lang.perl.active-perl » search and replace

Vorheriges Thema: Need help for open source and diagramming research
Nächstes Thema: Help with Regular Expression