Gossamer Forum
Home : General : Perl Programming :

need help (open file, print, close)

Quote Reply
need help (open file, print, close)
I have a textfile in this format:
userA|1
userB|1
userC|1
and so on...

Within a perl script I want to do the following :

open File
find $user # (for example userB)
print userB|2 #(should count upwards)
close File

now the textfile should look like this:

userA|1
userB|2
userC|1
and so on...

Which code do I have to apply? Thanks for any hints
or example codes.