.------[ Pravesh Biyani wrote (2002/11/12 at 17:49:14) ]------ | | hi | i have a prog which should create a file according to the date and name | it "$date.log" and write something depending upon other things in it! | Here is the code.. which refuses to work | | any clues.. ? | | TIA | | pravesh | | -------------------------------------------------------------- | #!/usr/bin/perl -w | | $prefix_file = ` date '+%x' ` ; | $log = ".log" ; | | print " the date is $prefix_file" ; | | $probe_logfile = $prefix_file . $log ; | | $probefile = "<probe.log" ; | $OUTFILE = ">>$probe_logfile"; | my ($line_number) = 0; | my ($yes) = 1; | my ($no) = 0; | open(probefile) or die("ERROR: $! \n"); | open(OUTFILE) or die ("ERRROR :$! \n"); | `-------------------------------------------------
You're not using open() correctly. You need to have something along the lines of: open(PROBE, $profile); open(OUT, $OUTFILE); while( <PROBE> ) { } You might want to re-read perldoc -f open. --------------------------------- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org --------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]