PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > The PowWeb Platform > Perl
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old 2-21-12, 07:04 AM   #1
brahma13
Registered
 
Join Date: Feb 2012
Location: UA
Posts: 1
Reputation: 0
Post string modification & save

Hello there.
Im interested in solving my problem.
I have two files.
25 Feb 21 12:14 site_ver.php
PHP Code:
define('site_ver'328); 
33 Feb 21 12:15 trans_ver.php
PHP Code:
define('translations_ver'110); 
I have some script.
Its a begining of it and it not finished
scr.pl

PHP Code:
#!/usr/bin/perl
$sv="site_ver.php";
$tv="trans_ver.php";
open (SVIN$sv) || die "Can't open $sv";
while (<
SVIN>)
chomp; print;}
print 
"\n";
close (SVIN); 
I need to get numbers from that files and increment them and after that save files.

For exmpl, define('site_ver', 328); after modification this string should looks like define('site_ver', 329);
328 > 329

Can anyone help me with this problem ?
brahma13 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:37 AM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright 2000-2007 Jelsoft Enterprises Limited.