> I'm tyring to covert an AWK script to Perl. Is there a better alternative
>
> then a2p?
write down logically what you want to achieve with the awk script ( pseudocode
) then write it in perl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginner
On Dec 14, 6:42 pm, oiss...@gmail.com (Tessio Fechine) wrote:
> Hello,
> I have a cgi application that has a two way communication with a ldap
> application via open2:
>
> |home.cgi| <===> |ldap.pl|
>
> I need to keep communicating with the same ldap.pl process as other cgi
> scripts are launched
split() splits on whitespace by default. so the "\s+/" is
optional.
$_ = "3 element array";
@words = split;
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
>
> perl -ne'print if $.==2 || $& && !$x++; $.=0 if /^--+$/'
>
> The $.==2 tests if the current line number is 2. If $. is 2 then the
> current line is printed and the program goes on to the next statement.
> If $. is not 2 then $& is tested and if $& is false then the current
> line is printed an
Hi
I run this command and pipe the output to a perl one liner. not quite
sure how it parses the data:
svmon -Pt3 | perl -e 'while(<>){print if($.==2 || $& && !$x++); $.=0 if
(/^--+$/)}'
which outputs:
---
Pid Command