How about this :-

open (SALARY,"c:/salary") || die"$!\n";
chomp (@read = <SALARY>);
close (SALARY);

$read = join '',@read;
$read = $read + 10;

open (SALARY,">c:/salary") || die "$!\n";
print SALARY $read;
close SALARY;

--- end of msg ------


----- Original Message -----
From: "nafiseh saberi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 7:14 PM
Subject: open read write


hi all.
how r u ?
I wish all of you be fine and happy.

I want to ...
1- open an existing file
2- read the number that exist in it
3- add it with 10
4-write the result in file.
5- note: I want to earse the last number and write the result
             instead of it.

I write some code ..but doesn't work.

open (SALARY,"-<c:/salary");
 read (SALARY,$salary,5)
  $salary=$salary+10;

  print SALARY $salary;
  close SALARY;


would you help me to compelte it.
thx for annnnnnnnnnny help.
___________________________

                Nafiseh Saberi
____________________________



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to