I overlooked the missing single quotes, Thanks!
-Jon
Hello,
I'm using the following line in Terminal, on OSX Lion, but I can't seem to
match parentheses '()':
perl -n -e 'print if(/\\(Submit\\)/)' visits/admin_add.ctp
I tried with one backslash in front of each '(' ')' as well to no avail.
If I remove the '\'s and '()' the match is printed like s
Dear Beginners List,
My code is based on an example from the XML::Twig documentation. I want to
capture the text of a couple elements that have descendant elements and put
this text in separate variables (one for each element's text). The problem
in the code example is that all the text of the l
Hello,
According to the grep manual page I can use the -P option to use Perl
regular expressions as follows:
grep -P PERL_REGEX INPUT_FILE
however, I cannot get the following pattern to match a literal dollar sign:
grep -P makan\$ file.txt
when I know this pattern is in the file. It matches
Hello Perl community,
I am trying to get a simple program working that will count the words in a
text file and put them in a hash with the key being the word and the value
being its frequency in the text file. Here is my code:
---
#!/usr/bin/perl
use strict;
use warnings;
{
open IN, ";
forea
I am truly a beginner. Could someone help me understand this syntax out of
a code example from "Learning Perl"? On line 5 I'm confused as to why "my
$number" is between "foreach" and the ()? is "my $number part of the loop?
sub running_sum {
state $sum = 0;
state @numbers;
foreach my $
Hello,
How can I set a requirement for (e.g. require the to
continue running the program)?
Thanks,
Jon