search and replace

search and replace

am 08.05.2009 10:35:15 von zilore mumba

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 @slashes;
my $slashes;

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

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

print OUT2 "@slashes";
close OUT2;

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

__END__





_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: search and replace

am 08.05.2009 10:50:19 von Bill Luebkert

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 (@slashes) {
> $slashes =~ s/\/{1,5}/9{1,5}/g;
> }

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

for (@slashes) {
s/\//9/g;
}

would be apropos.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: search and replace

am 08.05.2009 13:42:22 von zilore mumba

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



--- On Fri, 5/8/09, Bill Luebkert wrote:

> From: Bill Luebkert
> Subject: Re: search and replace
> To: zmumba@yahoo.com
> Cc: activeperl@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 (@slashes) {
> > $slashes =~ s/\/{1,5}/9{1,5}/g;
> > }
>
> $slashes isn't set anywhere.
> $_ contains each line of @slashes by default, so:
>
> for (@slashes) {
> s/\//9/g;
> }
>
> would be apropos.
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe:
> http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: search and replace

am 08.05.2009 19:30:54 von zilore mumba

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@walgreens.com wrote:

> From: Deane.Rothenmaier@walgreens.com
> Subject: Re: search and replace
> To: zmumba@yahoo.com
> Date: Friday, May 8, 2009, 3:58 PM
> >for my $i (@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 (@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 (@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@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: search and replace

am 08.05.2009 20:11:14 von asmith9983

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

>
> 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 @slashes;
> my $slashes;
>
> open (OUT1, "<$file1") or die "open '$file1: failed $! ($^E)";
> open (OUT2, ">$file2") or die "open '$file2: failed $! ($^E)";
> @slashes = ;
> close OUT1;
>
> for my $i (@slashes) {
> $slashes =~ s/\/{1,5}/9{1,5}/g;
> }
>
> print OUT2 "@slashes";
> close OUT2;
>
> unlink $file1 or die "Failed to delede $file1: $!\n";
>
> __END__
>
>
>
>
>
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@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.


--
Andrew in Edinburgh

2009/5/8 zi=
lore mumba <zmumba=
@yahoo.com
>

der-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-=
left: 1ex;">


Hello Perl community,

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.

///// ///// 92765 15426 679// 28011 10660 831//



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;".




am working on Windows with Cygwin.



My reading of the literature does not yield any solution. Assistance will b=
e appreciated.



Zilore.



#!/usr/bin/perl --



use strict;

use warnings;

use POSIX;

use File::Path;

use File::Copy;



# Variable declaration

my $debug =3D 1;



my $file1 =3D "file1.txt";

print "file1=3D'$file1'\n" if $debug;

my $file2 =3D "file2.txt";

print "file2=3D'$file2'\n" if $debug;



=A0 =A0my @slashes;

=A0 =A0my $slashes;



=A0 =A0open (OUT1, "<$file1") or die "open '$file1: =
failed $! ($^E)";

=A0 =A0open (OUT2, ">$file2") or die "open '$file2: =
failed $! ($^E)";

=A0 =A0 =A0 =A0@slashes =3D <OUT1>;

=A0 =A0close OUT1;



for my $i (@slashes) {

=A0 $slashes =3D~ s/\/{1,5}/9{1,5}/g;

=A0 }



print OUT2 "@slashes";

close OUT2;



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



__END__











_______________________________________________

ActivePerl mailing list

ActivePerl@listserv.=
ActiveState.com


To unsubscribe: target=3D"_blank">http://listserv.ActiveState.com/mailman/my subs




--001636c5b1fae2f6d404696a8d7f--

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

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1050293803==--

Re: search and replace

am 08.05.2009 20:12:06 von Williamawalters

--===============2036614742==
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@yahoo.com writes:

> > for (@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 (@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


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

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

hi deane --=
  



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



> > for (@slashes) {

> >    $_ =3D~ 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 (@slashes) {

> >    $_ =3D~ 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 &n=
bsp;'{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   



**************
Remember Mom this Mother's Day! Find=
a florist near you now. (http://yellowpages.aol.com/search?query=3Dfloris=
t&ncid=3Demlcntusyelp00000006)

--part1_c23.5effad00.3735cff6_boundary--

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

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============2036614742==--

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

am 20.05.2009 00:48:25 von David.Fish

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.
=20
#### test.pl ########
PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights reserved.
Standard license for David Fish
=20
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
/ 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.
=20
#### test2.pl #########
PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights reserved.
Standard license for David Fish
=20
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 / 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.
#######################
=20
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.
=20
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.
=20
Thanks for any assistance with this.



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

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.


=20


________________________________

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of A
Smith
Sent: Friday, May 08, 2009 2:11 PM
To: zmumba@yahoo.com
Cc: activeperl@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
=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 @slashes;
my $slashes;
=09
open (OUT1, "<$file1") or die "open '$file1: failed
$! ($^E)";
open (OUT2, ">$file2") or die "open '$file2: failed
$! ($^E)";
@slashes =3D ;
close OUT1;
=09
for my $i (@slashes) {
$slashes =3D~ s/\/{1,5}/9{1,5}/g;
}
=09
print OUT2 "@slashes";
close OUT2;
=09
unlink $file1 or die "Failed to delede $file1: $!\n";
=09
__END__
=09
=09
=09
=09
=09
_______________________________________________
ActivePerl mailing list
ActivePerl@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



charset=3Dus-ascii">


face=3DArial=20
color=3D#0000ff size=3D2>Hello!  I am getting the following error =
when I use=20
the perlapp for 8.0.  "This application has failed to start because =

perl58.dll was not found.  Re-installing the application may fix =
this=20
problem.".  This is what I see in dos when I run the perlapp=20
command.

face=3DArial=20
color=3D#0000ff size=3D2>
 

class=3D747443422-19052009>####=20
test.pl ########

PerlApp 8.0.1 build=20
289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights=20
reserved.
Standard license for David Fish < href=3D"mailto:david.fish@marriott.com">david.fish@marriott. com> FONT>

 

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

class=3D747443422-19052009>BEGIN failed--compilation aborted =
at  class=3D747443422-19052009>test.pl line 129.
' class=3D747443422-19052009>test.pl' had compilation=20
errors.

class=3D747443422-19052009> 

class=3D747443422-19052009>####=20
test2.pl #########

class=3D747443422-19052009>PerlApp 8.0.1 build 289861
Copyright (C) =
1998-2009=20
ActiveState Software Inc. All rights reserved.
Standard license for =
David=20
Fish < href=3D"mailto:david.fish@marriott.com">david.fish@marriott. com> SPAN>

 

class=3D747443422-19052009>Can't=20
load 'C:/Perl/site/lib/auto/Date/Calc/Calc.dll' for module Date::Calc:=20
loa
d_file:The specified module could not be found at /<C:\Program =

Files\ActiveState
 Perl Dev Kit=20
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.
 at =
test2.pl line=20
111
Compilation failed in require at test2.pl line 111.
BEGIN=20
failed--compilation aborted at test2.pl line 111.
'test2.pl' had =
compilation=20
errors.
#######################

 

size=3D2>When I=20
did the unistall of 5.8 and reinstall of 5.10 I did not remove the =
c:\perl=20
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. =20
Will I need to redownload those libraries even though I type ppm and =
they are=20
all shown active.


size=3D2>
 

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


size=3D2>
 

size=3D2>Thanks=20
for any assistance with this.


size=3D2>

David =
Fish

lang=3Den-us>Senior Systems =
Analyst
=20

Property Systems=20
Services

size=3D2>Work (301)=20
380-3331

size=3D2>Fax (301)=20
644-7521

size=3D2>BlackBerry=20
(301) 646-8985

size=3D2>david.fish@marriott.com


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

promptly notify the sender. Nothing in this communication is intended to =
operate=20
as an electronic signature under applicable law.



 






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


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

--
Andrew in =
Edinburgh


2009/5/8 zilore mumba < href=3D"mailto:zmumba@yahoo.com">zmumba@yahoo.com>

style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: =
rgb(204,204,204) 1px solid">
Hello=20
Perl community,
Once more excuse me for asking something very =
basic. I=20
have a file which has five-digit strings. Some of the groups may =
contains=20
from one to five slashes, as below.
///// ///// 92765 15426 679// =
28011=20
10660 831//

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

am working on Windows with =
Cygwin.

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

Zilore.

#!/usr/bin/perl --

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

# Variable declaration
my $debug =3D =
1;

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

  =
 my=20
@slashes;
   my $slashes;

   open =
(OUT1,=20
"<$file1") or die "open '$file1: failed $! ($^E)";
  =
 open=20
(OUT2, ">$file2") or die "open '$file2: failed $! =
($^E)";
 =20
     @slashes =3D <OUT1>;
   close =

OUT1;

for my $i (@slashes) {
  $slashes =3D~=20
s/\/{1,5}/9{1,5}/g;
  }

print OUT2 =
"@slashes";
close=20
OUT2;

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

__END__





____________________________=
___________________
ActivePerl=20
mailing list
=
href=3D"mailto:ActivePerl@listserv.ActiveState.com">ActivePe rl@listserv.A=
ctiveState.com
To=20
unsubscribe: href=3D"http://listserv.ActiveState.com/mailman/mysubs"=20
=
target=3D_blank>http://listserv.ActiveState.com/mailman/mysu bs

LOCKQUOTE>



------_=_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@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1380702614==--

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

am 20.05.2009 01:23:46 von Jan Dubois

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@listserv.ActiveState.com [mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Fish, David
Sent: Tuesday, May 19, 2009 3:48 PM
To: activeperl@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



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



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 / 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@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@listserv.ActiveState.com [mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of A Smith
Sent: Friday, May 08, 2009 2:11 PM
To: zmumba@yahoo.com
Cc: activeperl@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


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 @slashes;
my $slashes;

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

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

print OUT2 "@slashes";
close OUT2;

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

__END__





_______________________________________________
ActivePerl mailing list
ActivePerl@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

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


charset=3Dus-ascii">










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.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Cheers,



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>-Jan



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'> 



0in 4.0pt'>



0in 0in 0in'>

style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >From:=
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' > =
activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of =
Fish,
David

Sent: Tuesday, May 19, 2009 3:48 PM

To: activeperl@listserv.activestate.com

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







 



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.



 





style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>#### test.pl ########







style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>PerlApp 8.0.1 build 289861

Copyright (C) 1998-2009 ActiveState Software Inc. All rights =
reserved.

Standard license for David Fish < href=3D"mailto:david.fish@marriott.com">david.fish@marriott. com> 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:

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







style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>BEGIN failed--compilation aborted at test.pl line =
129.

'test.pl' had compilation errors.







 







style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>#### test2.pl #########







style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>PerlApp 8.0.1 build 289861

Copyright (C) 1998-2009 ActiveState Software Inc. All rights =
reserved.

Standard license for David Fish < href=3D"mailto:david.fish@marriott.com">david.fish@marriott. com> 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

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.

#######################







 







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.







 







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.







 







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







 





style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> David =
Fish



Senior =
Systems
Analyst


style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> Property
Systems Services


Work =
(301)
380-3331


Fax =
(301)
644-7521


style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> BlackBerry
(301) 646-8985


style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'> david.fish@ma=
rriott.com



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.



 





 





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

 










style=3D'font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:
style=3D'font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> =
activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of =
A
Smith

Sent: Friday, May 08, 2009 2:11 PM

To: zmumba@yahoo.com

Cc: activeperl@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 < href=3D"mailto:zmumba@yahoo.com">zmumba@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 =3D~
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 =3D 1;



my $file1 =3D "file1.txt";

print "file1=3D'$file1'\n" if $debug;

my $file2 =3D "file2.txt";

print "file2=3D'$file2'\n" if $debug;



   my @slashes;

   my $slashes;



   open (OUT1, "<$file1") or die "open =
'$file1:
failed $! ($^E)";

   open (OUT2, ">$file2") or die "open =
'$file2:
failed $! ($^E)";

       @slashes =3D <OUT1>;

   close OUT1;



for my $i (@slashes) {

  $slashes =3D~ s/\/{1,5}/9{1,5}/g;

  }



print OUT2 "@slashes";

close OUT2;



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



__END__











_______________________________________________

ActivePerl mailing list

href=3D"mailto:ActivePerl@listserv.ActiveState.com">ActivePe rl@listserv.A=
ctiveState.com


To unsubscribe: href=3D"http://listserv.ActiveState.com/mailman/mysubs"
target=3D"_blank">http://listserv.ActiveState.com/mailman/my subs
=





 













------=_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@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0199814030==--

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

am 20.05.2009 14:42:47 von David.Fish

This is a multi-part message in MIME format.

--===============2098128270==
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.
=20
=20

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

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.


=20


________________________________

From: Jan Dubois [mailto:jand@activestate.com]=20
Sent: Tuesday, May 19, 2009 7:24 PM
To: Fish, David; activeperl@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.

=20

Cheers,

-Jan

=20

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

=20

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.

=20

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

PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights
reserved.
Standard license for David Fish

=20

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

=20

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

PerlApp 8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software Inc. All rights
reserved.
Standard license for David Fish

=20

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 / 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.
#######################

=20

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.

=20

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.

=20

Thanks for any assistance with this.

=20

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

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.

=20

=20

=20

________________________________

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of A
Smith
Sent: Friday, May 08, 2009 2:11 PM
To: zmumba@yahoo.com
Cc: activeperl@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

=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 @slashes;
my $slashes;
=09
open (OUT1, "<$file1") or die "open '$file1: failed
$! ($^E)";
open (OUT2, ">$file2") or die "open '$file2: failed
$! ($^E)";
@slashes =3D ;
close OUT1;
=09
for my $i (@slashes) {
$slashes =3D~ s/\/{1,5}/9{1,5}/g;
}
=09
print OUT2 "@slashes";
close OUT2;
=09
unlink $file1 or die "Failed to delede $file1: $!\n";
=09
__END__
=09
=09
=09
=09
=09
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe:
http://listserv.ActiveState.com/mailman/mysubs

=20


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


"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml">
charset=3Dus-ascii">




face=3DArial=20
color=3D#0000ff size=3D2>Thanks!  That is what I was going to try =
today. =20
I will reply with the results.

class=3D312074212-20052009> 

 

David =
Fish

lang=3Den-us>Senior Systems =
Analyst
=20

Property Systems=20
Services

size=3D2>Work (301)=20
380-3331

size=3D2>Fax (301)=20
644-7521

size=3D2>BlackBerry=20
(301) 646-8985

size=3D2>david.fish@marriott.com


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

promptly notify the sender. Nothing in this communication is intended to =
operate=20
as an electronic signature under applicable law.



 






From: Jan Dubois =
[mailto:jand@activestate.com]=20

Sent: Tuesday, May 19, 2009 7:24 PM
To: Fish, =
David;=20
activeperl@listserv.activestate.com
Subject: RE: Upgrading =
Active=20
Perl from 5.8 to 5.10 and upgrading PDK 5.3 to =
8.0




style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'">Installing=20
Perl 5.10 on top of a 5.8 installation is not supported.  It is =
best to=20
install into a clean tree and then reinstall the PPM modules because =
the 5.8=20
versions are not binary compatible with 5.10.


style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'"> 


style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'">Cheers,


style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'">-Jan


style=3D"FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: =
'Calibri','sans-serif'"> 


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

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

style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Tahoma','sans-serif'">From:
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">=20
activeperl-bounces@listserv.ActiveState.com=20
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of =
Fish,=20
David
Sent: Tuesday, May 19, 2009 3:48 PM
To:=20
activeperl@listserv.activestate.com
Subject: Upgrading =
Active Perl=20
from 5.8 to 5.10 and upgrading PDK 5.3 to=20
8.0


 


style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Hello! =20
I am getting the following error when I use the perlapp for 8.0.  =
"This=20
application has failed to start because perl58.dll was not =
found. =20
Re-installing the application may fix this problem.".  This is =
what I see=20
in dos when I run the perlapp command.


 



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">####=20
test.pl ########



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">PerlApp=20
8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software =
Inc. All=20
rights reserved.
Standard license for David Fish < =
href=3D"mailto:david.fish@marriott.com">david.fish@marriott. com> SPAN>



 



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Can't=20
load 'C:/Perl/site/lib/auto/Crypt/Blowfish/Blowfish.dll' for module=20
Crypt:
:Blowfish: load_file:The specified module could not be found =
at=20
/<C:\Program Fil
es\ActiveState Perl Dev Kit=20
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line =
217.
 at test.pl=20
line 129
Compilation failed in require at test.pl line=20
129.



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">BEGIN=20
failed--compilation aborted at test.pl line 129.
'test.pl' had =

compilation errors.



 



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">####=20
test2.pl #########



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">PerlApp=20
8.0.1 build 289861
Copyright (C) 1998-2009 ActiveState Software =
Inc. All=20
rights reserved.
Standard license for David Fish < =
href=3D"mailto:david.fish@marriott.com">david.fish@marriott. com> SPAN>



 



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Can't=20
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=20
Files\ActiveState
 Perl Dev Kit=20
8.0.1\bin\lib\pdkcheck.exe>DynaLoader.pm line 217.
 at =
test2.pl=20
line 111
Compilation failed in require at test2.pl line =
111.
BEGIN=20
failed--compilation aborted at test2.pl line 111.
'test2.pl' had=20
compilation =
errors.
#######################



 



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">When I=20
did the unistall of 5.8 and reinstall of 5.10 I did not remove the =
c:\perl=20
directory.  I know that all the items I pulled down with ppm are =
in=20
perl/site/lib folder and it seems those are the .dll it is failing =
on. =20
Will I need to redownload those libraries even though I type ppm and =
they are=20
all shown active.



 



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Also,=20
there was no uninstall for 5.3 so I had to move the 5.3 related files =
out of=20
the way.   I did not check if it was overwritten with the =
upgrade to=20
8.0.



 



style=3D"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: =
'Arial','sans-serif'">Thanks=20
for any assistance with this.



 


'Arial','sans-serif'">David=20
Fish

style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Senior =
Systems=20
Analyst
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Property =
Systems=20
Services
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Work =
(301)=20
380-3331
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Fax (301) =

644-7521
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Arial','sans-serif'">BlackBerry (301)=20
646-8985
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Arial','sans-serif'">david.fish@marriott.com=20


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


 



 


MARGIN-RIGHT: 0in">

 






style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
'Tahoma','sans-serif'">From:
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">=20
activeperl-bounces@listserv.ActiveState.com=20
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of =
A=20
Smith
Sent: Friday, May 08, 2009 2:11 PM
To:=20
zmumba@yahoo.com
Cc:=20
activeperl@listserv.activestate.com
Subject: Re: search =
and=20
replace


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

--
Andrew in Edinburgh



2009/5/8 zilore mumba < =
href=3D"mailto:zmumba@yahoo.com">zmumba@yahoo.com>



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

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

am working on =
Windows=20
with Cygwin.

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

Zilore.

#!/usr/bin/perl --

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

# Variable declaration
my $debug =3D =
1;

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

  =
 my=20
@slashes;
   my $slashes;

   open =
(OUT1,=20
"<$file1") or die "open '$file1: failed $! ($^E)";
  =
 open=20
(OUT2, ">$file2") or die "open '$file2: failed $! =
($^E)";
 =20
     @slashes =3D <OUT1>;
   close =

OUT1;

for my $i (@slashes) {
  $slashes =3D~=20
s/\/{1,5}/9{1,5}/g;
  }

print OUT2 =
"@slashes";
close=20
OUT2;

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

__END__





____________________________=
___________________
ActivePerl=20
mailing list
=
href=3D"mailto:ActivePerl@listserv.ActiveState.com">ActivePe rl@listserv.A=
ctiveState.com
To=20
unsubscribe: href=3D"http://listserv.ActiveState.com/mailman/mysubs"=20
=
target=3D_blank>http://listserv.ActiveState.com/mailman/mysu bs
o:p>


class=3DMsoNormal> 

OTE>

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

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

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============2098128270==--