I am currently learning C++. I am going through the book "Beginning c++" from Wrox Press. All the stupid little programs I have written so far have worked flawlessly. But now I am in the OOP section and they are dividing up the code into different files. The program I am having problems with...
OK, I looked through various learning PERL books and here is what I found
All that "PERL in a Nutshell" says about 'o' is
And in "Teach yourself PERL in 21 days" it says
That is probably why I remembered that o forces a single match. But I could be misinterpreting what that book is trying...
If I remember from back in my days of "Perl in a Nutshell" that the o forces 1 match, but I could be wrong. I never use it because PERL will match only 1 by default. I was just using that to emphasize the regexp only matching the first block of digits.
I'll have to go back and and browse the...
Can anyone help me understand what is going on in this situation?
$a = 1;
$b = 2;
$c = 3;
print "$a $b $c\n";
for ($a, $b, $c){
$_++;
}
print "$a $b $c"
Output:
1 2 3
2 3 4
When I originally wrote this I thought that Perl might store a reference to each variable in $_ so I used $$_++...
If you reuse that array you won't really be wasting much memory, but it still is more lines of code and doesn't look as tidy.
I would recomend a simple regexp such as...
/\d+/o
The \d+ matches 1 or more digits in a row and the o forces only 1 match.
You'll get the same result, and as ishnid...
Hey guys,
I am having problems getting apache to allow access to perl scripts on my server. When you try to access one of them it produces the "access denied" message. In the error log is says, "client denied by server configurations" The owner of the scripts is apache and...
You guys all know how to make system commands (right?)
Ex. print `some command`;
Well, I was wondering if it is possible to direct that command towards an app that you are running instead of the shell. (Debian)
Thanks Mucho
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.