FYI...I was able to execute your code successfully
with a ten-thousand line file. A diff between the two
files displays the expected results.
If this is just a snippet, perhaps your problem lies
elsewhere within the script?
--- [EMAIL PROTECTED] wrote:
> Here is a code snippet that I wrote for th
Hi to all; I would like to access to Unix box via Windows 2000 Server
executing some remote commad to change the password for a generic user of
this unix box; more, I would like to avoid the prompt of the classic
"passwd" program, giving the coorect parameters to the perl program
In other words,
Here is a code snippet that I wrote for this procedure but for some reason the source
file seems to disappear on files with 4000+ lines. Just trying to isolate the
problem. Does anyone recommend a better way for this procedure?
open(SOURCE, "< $SOURCEFILE")
or die "\n* Could not ope
Mario,
Sure there is a better way, but
with
s/(\w+)\./$1_/g # All dots to underscores
you get
abc_def_ghi_jkl_mno
then, with
s/_(\w[^_]+)$/_\.$1/ # the last underscore to "_."
you get
abc_def_ghi_jkl_.mno
Antonio
El 27-may-04, a las 13:49, mario sanchez escribió:
help for a nov
Mario,
This will do what you're wanting:
1. #!/usr/bin/perl
2.
3. $string = "abc.def.ghi.jkl";
4. print "pre-sub: $string\n";
5.
6. $string =~ s/\./_/g;
7.
8. print "post-sub: $string\n";
Note line 6 is what actually does the substitution. You have to escape the
period because Perl will think
It's not pretty or elegant but it does get the job done:
$str = "abc.def.ghi.jkl.mno";
@parts = split /\./, $str;
for ($i=0; $i<$#parts; $i++) {
$new_str .= "$parts[$i]_"; }
$new_str .= ".$parts[-1]";
Matthew Schneider
System Administrator / Programmer
SKLD Information Services, LLC
303.820.0
help for a novice (going crazy)
i cant seem to find the sequence to substitute all "." with "_" EXCEPT for
the last one
ex. change abc.def.ghi.jkl.mno
to abc_def_ghi_jkl_.mno
any help or pointers please?
thank you
mario
___
Perl-Unix-Users mai
Does anyone know how to increase the timeout time for a soap transport over HTTP
client session? I have looked around in all the soap modules and the HTTP modules too
and can't find it anywhere.
Matthew Schneider
System Administrator / Programmer
SKLD Information Services, LLC
303.820.0863
___