-
Website
http://dmiessler.com/ -
Original page
http://dmiessler.com/blog/totally-insane-web-based-ide -
Subscribe
All Comments -
Community
-
Top Commenters
-
ax0n
5 comments · 1 points
-
Michael Blume
5 comments · 1 points
-
cooperati
179 comments · 2 points
-
dapxin
39 comments · 1 points
-
drew_reece
3 comments · 1 points
-
-
Popular Threads
(08:38:11) : Can't locate object method "new" via package "Benchmark" (perhaps you forgot to load "Benchmark"?) at /var/www/basic/lib/WPLib.pm line 304.
I get that when trying to run the following:
#!usr/bin/perl
use strict;
my $x;
my $count;
my @y;
my $y;
sub foo{
$count ;
if($count'2'){@y[$count] = @y[($count-1)] @y[($count-2)];}
if($count;
if($x=~m/[0-9] / && $x0){foo();}
elsif($x>20||$x
I have tried to remove the strict module and all of my "my" statements, but nothing seems to work. Still, this seems to be a new project and I am sure that as time passes, more and more support will be available and more and more language functionality will be supported. I am pretty excited to see what this project will develop into. Thanks for the heads up!
#!usr/bin/perl
use strict;
my $x;
my $count;
my @y;
my $y;
sub foo{
$count ;
if($count<=$x){
if($count=='1'){@y[$count]='0';}
if($count=='2'){@y[$count]='1';}
if($count>'2'){@y[$count] = @y[($count-1)] @y[($count-2)];}
if($count<$x){foo();}
elsif($count==$x){
foreach $y(@y){print $y." ";}
print "\n\n";
@y=();
main();
}
}
}
sub main{
$count=0;
print "Please enter a number [1..18] to continue\n:";
$x = <>
if($x=~m/[0-9] / && $x<=20 && $x>0){foo();}
elsif($x>20||$x<0){main();}
else{exit 0;}
}
main();
You've got an extra curly bracket ('}') at the end of the function definition for foo().
Also, the line below doesn't seem right. first, I think you need to use dollar signs instead of at symbols. Second, I think there's supposed to be an operation of some sort between "$y[($count-1)]" and "$y[($count-2)]".
if($count>’2′){@y[$count] = @y[($count-1)] @y[($count-2)];}
I wrote it out and corrected it myself.
check out www.createworkspace.com they are building something similar..