Ask a Question related to PERL Beginners, Design and Development.
-
Andrew Gaffney #1
Re: using grep in perl
Cy Kurtz wrote:
Code. We need code.> I'm trying to write a little program to take all of the fun out of the
> daily jumble.
>
> My plan is to get a sequence of letters from the user, move the letters
> around and bounce the resulting sequence of letters off of a spell check
> dictionary until the program generates an English word.
>
> When I call grep from the command line, grep returns what I expect. When
> I call grep from perl, I get:
>
> not enough arguments for grep
>
> or
>
> search pattern not terminated
--
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548
Andrew Gaffney Guest
-
perl grep..
Taylor Lewick wrote: I didn't remove the "\n" character from the input line so it doesn't have to be added to the output line and print() prints... -
grep with [ ] brackets ... ?
I'd thought I'd seen everything with perl until I saw John Krahn give this code as a solution: #syntax: unfold.pl filename > newfilename ... -
grep with ftp
Howdy: I'm looking for information that will let me open an ftp connection and grep / search for files and then FTP them back to me. I saw... -
grep
Hi. I'm trying to make the following work: $index = 0; foreach (@mac){ if (grep /$_/, $legalmacs !~ 0){ push @violators, join('',@mac,"... -
grep-dctrl
Hi, I installed mysql-server on my server, and now I want to install lynx and/or ntpclient. This gives an error: kain:/var/log/apache#... -
Cy Kurtz #2
using grep in perl
I'm trying to write a little program to take all of the fun out of the
daily jumble.
My plan is to get a sequence of letters from the user, move the letters
around and bounce the resulting sequence of letters off of a spell check
dictionary until the program generates an English word.
When I call grep from the command line, grep returns what I expect. When
I call grep from perl, I get:
not enough arguments for grep
or
search pattern not terminated
Thanks,
Cy Kurtz
Cy Kurtz Guest
-
Rob Dixon #3
Re: using grep in perl
Cy Kurtz wrote:
Perl isn't a scripting language, and the Perl 'grep' function>
> I'm trying to write a little program to take all of the fun out of the
> daily jumble.
>
> My plan is to get a sequence of letters from the user, move the letters
> around and bounce the resulting sequence of letters off of a spell check
> dictionary until the program generates an English word.
>
> When I call grep from the command line, grep returns what I expect. When
> I call grep from perl, I get:
>
> not enough arguments for grep
>
> or
>
> search pattern not terminated
isn't shelling out to run the grep program.
'grep' takes either an expression or a Perl block as its first
parameter. It returns those elements of the following list for
which the expression/block are 'true'.
We can't tell what's wrong without seeing your daily jumble :)
Rob
Rob Dixon Guest
-
Jeff 'Japhy' Pinyan #4
Re: using grep in perl
On Feb 3, Cy Kurtz said:
Are you calling grep from Perl, or using Perl's grep() function?>I'm trying to write a little program to take all of the fun out of the
>daily jumble.
>
>My plan is to get a sequence of letters from the user, move the letters
>around and bounce the resulting sequence of letters off of a spell check
>dictionary until the program generates an English word.
>
>When I call grep from the command line, grep returns what I expect. When
>I call grep from perl, I get:
Those sound like Perl error messages. Show us your code, please.>not enough arguments for grep
>search pattern not terminated
--
Jeff "japhy" Pinyan [email]japhy@pobox.com[/email] [url]http://www.pobox.com/~japhy/[/url]
RPI Acacia brother #734 [url]http://www.perlmonks.org/[/url] [url]http://www.cpan.org/[/url]
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
Jeff 'Japhy' Pinyan Guest



Reply With Quote

