Search Results

Showing results 1 to 6 of 6
Search took 0.01 seconds.
Search: Posts Made By: Murtan ; Forum: Perl and child forums
Forum: Perl Jan 20th, 2009
Replies: 8
Views: 941
Posted By Murtan
int(rand 10) returns numbers in the range 0 to 9
int (rand 10)+1 returns numbers in the range 1 to 10

while(1) is a continuous loop...it will keep looping until you 'break' or 'last'.
Forum: Perl Jan 20th, 2009
Replies: 8
Views: 941
Posted By Murtan
I agree with Comatose, you should probably put the part that prompts for and accepts new input inside the loop somehow. That way as the loop is run again you ask for input again.

The psuedo-code...
Forum: Perl Jan 9th, 2009
Replies: 1
Views: 496
Posted By Murtan
You could do something like this with regular expressions:

if ($stringToSearch =~ /string_id\((.*?)\)/) {
print "Found $1\n"
}
Forum: Perl Dec 21st, 2008
Replies: 11
Views: 1,535
Posted By Murtan
The first point was a link to an article that describes why the concept of 'security through obscurity' was false. (The concept that just because you aren't telling anyone about how you do something...
Forum: Perl Nov 28th, 2008
Replies: 4
Views: 1,048
Posted By Murtan
I tried to say it before, but you didn't appear to understand.

You CAN NOT foreach over arr3 inside the if match


foreach $str1(@arr1)
{
for (my $ii=0; $ii< scalar(@arr2); $ii++)
{
...
Forum: Perl Nov 27th, 2008
Replies: 4
Views: 1,048
Posted By Murtan
I believe your algorithm is the source of your problem...you are running 3 nested loops, when I think your intent is to iterate at least some of the arrays simultaneously.

Your algorithm (as...
Showing results 1 to 6 of 6

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC