Forum: Perl Jan 20th, 2009 |
| Replies: 8 Views: 941 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 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 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 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 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 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... |