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");
while(<probefile>) {
my @row_elems =split ;
for (my $x=0; $x<3 ; ++$x)
{
$rows[$x][$line_number] =$row_elems[$x] ;
if($rows[1][$line_number] > 0.1)
{
print OUTFILE "$rows[0][$line_number] \t $yes \t";
}
else
{
print OUTFILE "$rows[0][$line_number] \t $no \t";
}
}
}
John W. Krahn wrote:
Julien Motch wrote:Hello ,Hello,I am new to perl and here is my problem .I have written a programm which checks my mail and sends me instant message via gabber when 10 or more mail arrive or when a special sender writes me .The problem is that I receive the message head in one string .I want to isolate the line which contains the word 'Subject:' (by the way of grep do it ).Do you know a way to do that ?my ($subject) = $message =~ /\nSubject:\s*(.*)/; John
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]