Date: 08/27/06 (Computer Geeks) Keywords: no keywords this is my first time using perl and i'm completely stuck. #!/usr/bin/perl -w #open the file open (SAMPLE, "sample") || die ("Could not open the file. \n"); $text = < SAMPLE >; print "text is $text"; $number = substr($text, 16, 1); $number++; substr($text, 16, 1) = $number; print "text is now $text \n"; close (SAMPLE); open (SAMPLE, '>>sample') || die ("couldnt open sample the 2 time. \n"); print SAMPLE "$text"; close (SAMPLE); i've been at this for way too long and i'm sure its a very basic thing. anyone give me a nudge? Source: http://community.livejournal.com/computergeeks/970685.html
|