RE: How to parse UNIX commands ...

2006-10-26 Thread Thomas Bätzler
Hi, [EMAIL PROTECTED] asked: > How do I parse or evaluate the output of UNIX commands? > > For example, in UNIX scripts, I can run filesystem=`df -k | > awk -F"" ' { print > $6 }'` to check for the mount points. > > How do I achieve the same in Perl? That is, I tried: Essentially in the same

Re: How to parse UNIX commands ...

2006-10-26 Thread Arnaldo Guzman
On Fri, 2006-10-27 at 17:30 +1300, [EMAIL PROTECTED] wrote: > Hi all, > > How do I parse or evaluate the output of UNIX commands? > > For example, in UNIX scripts, I can run filesystem=`df -k | awk -F"" ' { print > $6 }'` to check for the mount points. > > How do I achieve the same in Perl? That

How to parse UNIX commands ...

2006-10-26 Thread benbart
Hi all, How do I parse or evaluate the output of UNIX commands? For example, in UNIX scripts, I can run filesystem=`df -k | awk -F"" ' { print $6 }'` to check for the mount points. How do I achieve the same in Perl? That is, I tried: #!/usr/bin/perl $x=system 'df -k'; print "===

Re: Sample https:// login script

2006-10-26 Thread Lyvim Xaphir
On Fri, 2006-10-13 at 07:01 -0400, zentara wrote: > On Thu, 12 Oct 2006 06:03:51 -0400, [EMAIL PROTECTED] (Lyvim Xaphir) > wrote: > > >Hello everyone. I'm looking for a perl script that utilizes > >Crypt:SSLeay to log in to an https server with a name and password. > >Does anyone know where to fi

Re: How to pass string in command line argument.

2006-10-26 Thread Mumia W.
On 10/26/2006 05:47 AM, perl pra wrote: hi , I want to pass a command argument to perl script with double quotes (" ); below is my scenario my xml file is something like this .. 123 this is my name 234 this is others name my perl script is something like this my $x

Re: Is that I can do something like that ?

2006-10-26 Thread Bryan R Harris
> Bryan R Harris wrote: >> 2) perl -le '$x = qw/a b c d e/; print $x' e Or better what is (2) doing? >>> Read up on the comma operator in perlop (and I know there are no literal >>> commas in (2) but qw/a b c d e/ behaves exactly the same as ('a', 'b', 'c', >>> 'd', 'e').) >>> >>>

Re: How to pass string in command line argument.

2006-10-26 Thread Rob Dixon
perl pra wrote: > > Rob Dixon wrote: >> >> perl pra wrote: >>> >>> >>> I want to pass a command argument to perl script with double quotes (" ); >>> >>> >>> below is my scenario >>> >>> my xml file is something like this .. >>> >>> >>> >>> >>> >>>123 >>> this is my name >>> >>> >>>

Re: Spam from this list

2006-10-26 Thread rahed
[EMAIL PROTECTED] (zentara) writes: > The server is nntp.perl.org and subscribe to perl.beginners. Recently (months) I experience long responses from this server and occasionally outages. -- Radek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Analize Java source file with perl?

2006-10-26 Thread Ovid
--- "bou, hou (GE Money, consultant)" <[EMAIL PROTECTED]> wrote: > For Example > a java file named AAA.java > > /* author : John Smith */ > // comment > public class ClassA { > /* */ > //comment > public static void main(String[] args) { > } > ... > } > class ClassB

Re: Analize Java source file with perl?

2006-10-26 Thread Jenda Krynicky
From: "Andy Greenwood" <[EMAIL PROTECTED]> > I'm sure there's a better way to do this, but it really isn't too > hard. > > -start > --- #!/usr/bin/perl use warnings; use strict; > > my $file = shift || die "Please provide a j

Re: Analize Java source file with perl?

2006-10-26 Thread Adriano Rodrigues
On 10/26/06, bou, hou (GE Money, consultant) <[EMAIL PROTECTED]> wrote: hello, all I want to get the Class name of .java file with perl , I want to get like this >perl ClassChecker.pl AAA.java >ClassA >ClassB Quick and dirty: $ perl -n -e 'print "$1\n" if /class\s+(\w+)/' AAA.java ClassA Cl

Re: Analize Java source file with perl?

2006-10-26 Thread lawrence
> > hello, all > I want to get the Class name of .java file with perl , > How can I do it ? I think it is difficult to result the java comment . > For Example What have you tried, and how has it failed to meet your expectations? You may want to try http://search.cpan.org/ to see if something i

Re: Analize Java source file with perl?

2006-10-26 Thread Andy Greenwood
I'm sure there's a better way to do this, but it really isn't too hard. -start--- #!/usr/bin/perl use warnings; use strict; my $file = shift || die "Please provide a java file to check.\n"; my @lines = `cat $file`; foreach

Analize Java source file with perl?

2006-10-26 Thread bou, hou \(GE Money, consultant\)
hello, all I want to get the Class name of .java file with perl , How can I do it ? I think it is difficult to result the java comment . For Example a java file named AAA.java /* author : John Smith */ // comment public class ClassA { /* */ //comment public static void

Re: How to pass string in command line argument.

2006-10-26 Thread Rob Dixon
perl pra wrote: hi , I want to pass a command argument to perl script with double quotes (" ); below is my scenario my xml file is something like this .. 123 this is my name 234 this is others name my perl script is something like this my $xmlfile = "./samp1.xml";

How to pass string in command line argument.

2006-10-26 Thread perl pra
hi , I want to pass a command argument to perl script with double quotes (" ); below is my scenario my xml file is something like this .. 123 this is my name 234 this is others name my perl script is something like this my $xmlfile = "./samp1.xml"; my $ref =