I have problem with search digits in my string.
I have two files.
stver.php
define('upd_ver', 256);
tr_ver.php
define('code_ver', 110);
The problem is: how to find digits (256 and 110) make increment and save files.
Exmpl, string define(‘upd_ver’, 256); after saving becomes define(‘upd_ver’, 257);
#!/usr/bin/perl
$sv="stver.php";
$tv="tr_ver.php";
open (SVIN, $sv) || die "Can't open $sv";
while (<SVIN>)
{ chomp; print;}
print "\n";
close (SVIN);
One approach:
The
/eflag causes the replacement-string to be evaluated, and its result substituted in, rather than the replacement-string itself being simply plopped in as a literal string.