S0ld13r Fr0m H311
New member
!/usr/bin/perl
$start = time();
$x = 1;
$f = 3647;
$g = 5428;
$h = 7825;
while ($x > 0)
{
if ($f % $x == 0)
{
print "$f % $x = 0";
}
if ($g % $x == 0)
{
print "$g % $x = 0";
}
if ($h % $x == 0)
{
print "$h % $x = 0";
}
$x += 1;
$x += 1;
if ($x > $h)
{
break;
}
}
$end = time();
print "script execution: ", ($end - $start), " seconds";
That code does not execute, all of this just sits there and has a blinking courser, it shows no signs of a crash, it says:
use of uninitialized value $x in scalar variable at factorial.pl line 9
when I use #!usr/bin/perl -w
what is going on
$start = time();
$x = 1;
$f = 3647;
$g = 5428;
$h = 7825;
while ($x > 0)
{
if ($f % $x == 0)
{
print "$f % $x = 0";
}
if ($g % $x == 0)
{
print "$g % $x = 0";
}
if ($h % $x == 0)
{
print "$h % $x = 0";
}
$x += 1;
$x += 1;
if ($x > $h)
{
break;
}
}
$end = time();
print "script execution: ", ($end - $start), " seconds";
That code does not execute, all of this just sits there and has a blinking courser, it shows no signs of a crash, it says:
use of uninitialized value $x in scalar variable at factorial.pl line 9
when I use #!usr/bin/perl -w
what is going on