Hi,
I am looking for an efficient way to do consecutive grep's in perl, i.
e. a possibility to resemble something like
'cat some_file | grep pattern1 | grep pattern2 | grep pattern3'.
I know I can do that as follows:
@array = ;
@res_grep1 = grep /pattern1/, @array;
@res_grep2 = grep /pattern1
Hi Charlie,
On Mon, Jul 08, 2002 at 07:50:22PM -0700, charlie strauss wrote:
> You might think, "well just join the @ARGV array and voila!: but
> this is not exactly the same thing. the main differtence is that
> perl removes any surrounding quotation marks of the split arguments.
I don't think
Hello Zachary,
On Sat, Jul 06, 2002 at 11:19:58PM -0700, Zachary Buckholz wrote:
> Odd extra '1' showing up? Can someone explain this.
> my $current_date = printf("%04d-%02d-%02d", $year+1900, $month+1, $day);
^^
The problem lies here. You have to use sprintf to get a
Hello,
I have some shell scripts that I want to start from a perl script on
about 10 hosts via ssh. At the moment I start them one after another.
As you probably can imagine this takes quite a long time. So I would
like to process them in parallel. How could that be done? Threads?
I'd really app
Hello Paul,
On Sat, Jun 15, 2002 at 06:27:18PM +0200, Paul Johnson wrote:
> > sub test_params()
> > {
> >@ARGV=@_;
> local @ARGV = split " ", shift;
> Hopefully you can work out what the problem was and why the fix works.
I can't believe how blind I've been. Thank you very much. I now
c
Hello,
I'm trying to use Getopt::Long for parsing parameters passed to a
function. I tried to test if that works by using the following script.
---
#!/usr/bin/perl -w
use strict;
use Getopt::Long;
sub test_params()
{
@ARGV=@_;
print "ARG