Bis wrote:
I want to make the case of the first letter of all the words in a
selected string to upper case. The code
s/\b(\w+)/\u$1\E/g;
enables me to do this for the whole document.
But the string I want to match and operate on is all instances of text
following the string
SCTN:
as in
SCTN: N
try this:
my $source_file = "searchandreplace.txt";
open(IN,"<$source_file") || die "can't open file: $1";
while() {
$row = $_;
$row =~ s/\s+\w+//i;
push(@arr, $row);
}
close(IN);
open(OUT,">$source_file" ) || die "can't open file: $1";
foreach (@arr) {
print O
Jeff Westman wrote:
Try:
use strict;
use warnings;
...
my $returnValue =
"copy("machine1\\share\\file1","machine2\\share\\file2");
you probably don't want that first quotation mark before copy.
unless ($returnValue) warn "Copy failed: $!";
you could do it in one step as:
Ramprasad A Padmanabhan wrote:
Voodoo Raja wrote:
Sorry for not posting it in the first place.
Will this sub.. chew memory if I run it a number of times.. or does
it overwrite it.
sub read {
print "\nreading data";
$db = DBI->connect("DBI:mysql:$dbase:$hostname", $username, $password);
as Ra