Perl Confirmation Code Generation

Heres what I wanna do...


I want to open a file that has one number in it, take that number and increment it, and then write it back to the same file -- overwriting the existing number.


heres the code i have written so far, but this is obviously not working..


#!c:perlinperl.exe -w


open(CONFIRM,"confirmation") or die "Could not generate a confirmation number for you at this time.";

while($line=){

$number=$line;

print CONFIRM $number;

}


I think I am just opening the file wrong.. what do you think?




URL:mailto:jsoeder@itsservice.com

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories