returning file info to C code

2008-06-25 Thread shorti
Hello, I am a C coder but new to Perl. I am running in an AIX environment. I was wondering if there was a Perl way to return string data (or larger int values) to a C program? For instance, if I use the command : ps aux | grep process123 my out put would look like this: emextra 45304 0.0

Re: isolating text in a string

2008-06-25 Thread John W. Krahn
Tim Bowden wrote: Hi, Hello, I'm trying to isolate text in a string. My string is typically of the form: sometext[moretext, I would like to isolate moretext. I tried: #!/usr/bin/perl -w my $string = 'sometext[moretext,'; print $string; my $snippet; ($snippet, $snippet) =

RE: returning file info to C code

2008-06-25 Thread Thomas Bätzler
shorti [EMAIL PROTECTED] asked: Hello, I am a C coder but new to Perl. I am running in an AIX environment. I was wondering if there was a Perl way to return string data (or larger int values) to a C program? You exchange data with a Perl program in the same way you'd exchange data with any

Re: How do I implement this?

2008-06-25 Thread bdy120602
On Jun 21, 4:34 am, [EMAIL PROTECTED] (Gowthamgowtham) wrote: How would I implement this example to parse an HTML file? I know I'm missing something because I don't see a place in the module, or whatever this is, for the HTML file to be referenced. Just assume I know very little. package

question on appending file

2008-06-25 Thread bob
Hi I wrote a program to append a number to an existing file. but found a problem that i can't understand *** code1: my $cnt= 0 open FILE, diff.txt; while (FILE) { if (match some condition) { $cnt= $cnt+ 1; } } print FILE cnt

Re: question on appending file

2008-06-25 Thread Octavian Rasnita
From: bob [EMAIL PROTECTED] Hi I wrote a program to append a number to an existing file. but found a problem that i can't understand *** code1: my $cnt= 0 open FILE, diff.txt; while (FILE) { You want to read from the file, but you

Re: File output - help

2008-06-25 Thread Dr.Ruud
Dermot schreef: #!/bin/perl use strict; use warnings; my @luns; while (DATA) { chomp; Why chomp? next unless $_ =~ /LUN/; $_ =~ /\[(LUN\s+\d+)\]/; There is no need to mention $_ in those lines. (I don't think it is bad that you do, but I wouldn't.) $1 can remain

Re: File output - help

2008-06-25 Thread jet speed
Thanks Rob, Much appreciated Sj On 6/24/08, Rob Dixon [EMAIL PROTECTED] wrote: Dermot wrote: Welcome, 2008/6/24 jet speed [EMAIL PROTECTED]: Hi, I am beginner to perl, I have a file name cxout and i want to capture just the LUN 415, LUN 815 into arrray then print from the

Re: how I could do it with perl?

2008-06-25 Thread Rob Dixon
Eng. Fadhl Al_Akwaa wrote: Hi All I could not do it with matlab could perl do it? I appreciate if I have solution for this problem I try to extract two columns from a text file(8 columns) with variable number of headerlines, and variable line length. below is one line of my data

Re: question on appending file

2008-06-25 Thread Rob Dixon
bob wrote: Hi I wrote a program to append a number to an existing file. but found a problem that i can't understand *** code1: my $cnt= 0 open FILE, diff.txt; while (FILE) { if (match some condition) { $cnt= $cnt+ 1;

Re: returning file info to C code

2008-06-25 Thread Rob Dixon
shorti wrote: Hello, I am a C coder but new to Perl. I am running in an AIX environment. I was wondering if there was a Perl way to return string data (or larger int values) to a C program? For instance, if I use the command : ps aux | grep process123 my out put would look like this:

Sending HTML files via mail

2008-06-25 Thread btna
Hi all, I am very new to Perl. I have a HTML file that I need to send via mail but I don't want the attachment. I want the HTML file to be displayed in the mail when the mail is received. In other words, the HTML file becomes the content of the mail. I have this so far: use strict; use

Regular expressin

2008-06-25 Thread Manasi Bopardikar
Anyone knows regex for---option value=ACE Athletic Coaching Education (ACE )/option Thanks and Regards, Manasi Bopardikar|s/w Engineer|Persistent SystemsLtd (+91)(020)(30234497)|9767218759 [EMAIL PROTECTED] DISCLAIMER == This e-mail may contain privileged and confidential

Re: Regular expressin

2008-06-25 Thread Rob Dixon
Manasi Bopardikar wrote: Anyone knows regex for---option value=ACE Athletic Coaching Education (ACE )/option What would you like to do with that string? If you simply want to match the entire string literally then simply put \Q immediately before it to escape the special characters. HTH, Rob

Re: Regular expressin

2008-06-25 Thread Jeff Peng
On Wed, Jun 25, 2008 at 7:50 PM, Manasi Bopardikar [EMAIL PROTECTED] wrote: Anyone knows regex for---option value=ACE Athletic Coaching Education (ACE )/option what do you want to capture? if you're asking for the full string, then don't need a regex. if ($string eq your that string) { #

Re: Regular expressin

2008-06-25 Thread Jenda Krynicky
From: Manasi Bopardikar [EMAIL PROTECTED] Anyone knows regex for---option value=ACE Athletic Coaching Education (ACE )/option If it's HTML use HTML::Parser or some other HTML parsing module, if it's XML use XML::Rules, XML::Twig, XML::LibXML or some other of the tens of XML parsing modules.

RE: Sending HTML files via mail

2008-06-25 Thread Bob McConnell
From: btna Hi all, I am very new to Perl. I have a HTML file that I need to send via mail but I don't want the attachment. I want the HTML file to be displayed in the mail when the mail is received. In other words, the HTML file becomes the content of the mail. Why do you want to send

Re: Regular expressin

2008-06-25 Thread Jeff Peng
the simplest way, try: my ($result) = $str =~ /\(.+)\/; On Wed, Jun 25, 2008 at 8:06 PM, Manasi Bopardikar [EMAIL PROTECTED] wrote: I need -Athletic Coaching Education (ACE ) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Sending HTML files via mail

2008-06-25 Thread Jeff Peng
I once used this script for sending a html message. Wish it help to you too. sub sendmail { my $to = shift; my $msg = MIME::Lite-new( From= $sender_name $sender_email, To = $to, Subject = $subject, Type= 'text/html', Encoding =

Re: Sending HTML files via mail

2008-06-25 Thread Francisco Valladolid
Hi. While I has doing a similar script, I found MIME::Lite::HTML ( http://search.cpan.org/~alian/MIME-Lite-HTML-1.22/HTML.pm ) and MIME::Lite::TT::HTML http://search.cpan.org/~chunzi/MIME-Lite-TT-HTML-0.04/lib/MIME/Lite/TT/HTML.pm both modules look fine for this purpose. Regards, On Tue, Jun

I could not do it with matlab could perl do it?

2008-06-25 Thread fadlyemen
Hi All I could not do it with matlab could perl do it? I appreciate if I have solution for this problem I try to extract two columns from a text file(8 columns) with variable number of headerlines, and variable line length. below is one line of my data S= ‘GO:022 0.00312066574202497 9/2884

how I could do it with perl?

2008-06-25 Thread Eng. Fadhl Al_Akwaa
Hi All I could not do it with matlab could perl do it? I appreciate if I have solution for this problem I  try to extract two columns from a text file(8 columns) with variable number of headerlines, and variable line length. below is one line of my data    S= ‘GO:022 

Re: isolating text in a string

2008-06-25 Thread sisyphus
On Jun 25, 11:20 am, [EMAIL PROTECTED] (Tim Bowden) wrote: Hi, I'm trying to isolate text in a string. My string is typically of the form: sometext[moretext, I would like to isolate moretext. I tried: #!/usr/bin/perl -w my $string = 'sometext[moretext,'; print $string; my $snippet;

Re: how I could do it with perl?

2008-06-25 Thread David Romero
2008/6/25 Eng. Fadhl Al_Akwaa [EMAIL PROTECTED]: Hi All I could not do it with matlab could perl do it? I appreciate if I have solution for this problem I try to extract two columns from a text file(8 columns) with variable number of headerlines, and variable line length. below is one line

Re: returning file info to C code

2008-06-25 Thread shorti
Thanks so much for all the input. I have a couple of Perl books but couldnt seem to find what I was looking for and wasnt sure what the key words were. This information will help me on my way! =) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: returning file info to C code

2008-06-25 Thread shorti
On 25 Jun, 03:43, [EMAIL PROTECTED] (Zentara) wrote: On Tue, 24 Jun 2008 16:44:47 -0700 (PDT), [EMAIL PROTECTED] (shorti) wrote: Hello, I am a C coder but new to Perl.  I am running in an AIX environment.  I was wondering if there was a Perl way to return string data (or larger int values)

including LD_LIBRARY_PATH within a script

2008-06-25 Thread Ravi Malghan
Hi: I have a script which runs fine when I run it from the shell prompt. But when I run it from within another application, I get the following error Can't load '/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/ARS/ARS.so' for module ARS: ld.so.1: perl: fatal: libicudatabmc.so.32: open

Re: including LD_LIBRARY_PATH within a script

2008-06-25 Thread David Romero
this is one way to do that. use lib /libDirectory/; Note. Some modules use .so files, on some hostings i'm put on the lib directory the module and the .so lib en the auto directory. The auto directory content depends on the platform, is diferent if your hosting use windows or linux. On Wed,

Re: how I could do it with perl?

2008-06-25 Thread John W. Krahn
David Romero wrote: 2008/6/25 Eng. Fadhl Al_Akwaa [EMAIL PROTECTED]: I could not do it with matlab could perl do it? I appreciate if I have solution for this problem I try to extract two columns from a text file(8 columns) with variable number of headerlines, and variable line length. below

Re: returning file info to C code

2008-06-25 Thread shorti
  perl -ane print qq(@F[1,4]\n) HTH, Rob- Hide quoted text - How do you call and output this in the C program? If using a system() call...how is the output retrieved? Last, what key words can I look up to find out what the syntax means in this line..I looked up filters but it didnt show

Re: how I could do it with perl?

2008-06-25 Thread Eng. Fadhl Al_Akwaa
yes thanx. I am wondering how much perl strong? from today I will give up matlab and start perl Fadhl M. Al-Akwaa Biomedical Engineering, PhD Student --- On Wed, 6/25/08, Rob Dixon [EMAIL PROTECTED] wrote: From: Rob Dixon [EMAIL PROTECTED] Subject: Re: how I could do it with perl? To:

Re: how I could do it with perl?

2008-06-25 Thread fadlyemen
On Jun 25, 2:01 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: Eng. Fadhl Al_Akwaa wrote: Hi All I could not do it with matlab could perl do it? I appreciate if I have solution for this problem I try to extract two columns from a text file(8 columns) with variable number of headerlines, and

Re: how I could do it with perl?

2008-06-25 Thread fadlyemen
On Jun 25, 2:01 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: Eng. Fadhl Al_Akwaa wrote: Hi All I could not do it with matlab could perl do it? I appreciate if I have solution for this problem I try to extract two columns from a text file(8 columns) with variable number of headerlines, and

Re: including LD_LIBRARY_PATH within a script

2008-06-25 Thread Ravi Malghan
That didn't do it. Probably something to with the .so file you described. Should I have installed the library files somewhere else maybe? - Original Message From: David Romero [EMAIL PROTECTED] To: beginners@perl.org Sent: Wednesday, June 25, 2008 3:49:54 PM Subject: Re: including

Re: Sending HTML files via e-mail

2008-06-25 Thread Randal L. Schwartz
btna == btna [EMAIL PROTECTED] writes: btna I am trying to write a simple Perl script that will accept the HTML btna file as one argument and then send an e-mail with the HTML file. Is there *any* way I can convince you that HTML is not email? -- Randal L. Schwartz - Stonehenge Consulting