Ankit Gupta [[EMAIL PROTECTED]] quoth:
*>
*> I need help to parse emails for their From, UID and message text fields
*>from a local mailbox file (unix type). I am using Windows Me and any sort of
*>help in this direction would be highly appreciated. If someone can provide
*>some sample code, that
On Friday, April 12, 2002, at 07:55 PM, Gabriel Duchateau wrote:
> I am trying to setup a small application with a passwd controlled access.
> I
> need just a little bit of security so I decided to use the crypt function
> on
> perl to encrypt the user passwd. The problem I have is when writi
I am trying to setup a small application with a passwd controlled access. I
need just a little bit of security so I decided to use the crypt function on
perl to encrypt the user passwd. The problem I have is when writing the
encrypted passwd to a file using the pack function. The pack function
ret
On Apr 12, Ahmed Moustafa said:
>I found it in . It was 0x0001.
>
>Is use POSIX ":sys_wait_h"; portable?
Far more portable than blindly using 0x01.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://w
I found it in . It was 0x0001.
Is use POSIX ":sys_wait_h"; portable?
Ahmed Moustafa wrote:
>
> waitpid $pid,&WNOHANG;
>
>
> What is the value of the flag WNOHANG in waitpid?
> What does it mean when $pid is -1?
>
> Thanks in advance.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
waitpid $pid,&WNOHANG;
What is the value of the flag WNOHANG in waitpid?
What does it mean when $pid is -1?
Thanks in advance.
--
Ahmed Moustafa
http://pobox.com/~amoustafa
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
"Tirthankar C. Patnaik" wrote:
>
> Thanks a lot. Your guess was right. The second part was what I needed. I am
> still not a little confused about the first, though. They do not teach
> this in the institution where I study. :)
>
> Could you give a good reference to this things, IPC, pipes, fifo
Thanks to all...
>Some useful perl control structures:
>
>do { statements; } while someexpression;
>do { statements; } until someexpression;
>while (someexpression) { statements; } --or-- statement while
>someexpression;
>until (someexpression) { statements; } --or-- statement until
>someexpressi
Guan boon lee wrote:
>
> I would like to find a word or character in a file and
> replace it with another word or character, while
> leaving others untouched. Currently, I am using the
> following method
>
> #!/bin/perl -Dr -w
> open(FILE,"$ARGV[0]") || die "Can't open $ARGV[0]:
> $!\n";
> open
On Friday, April 12, 2002, at 12:58 PM, David Gray wrote:
>> for e.g :
>>
>> (not showing the new lines..)
>>
>>
>> word1.word1.word1word2word1...word2wor
>> d2word2
>> .
>
> You're gonna want to check out (in the perldoc perlre manpage) (??{ code
> }), which
On Fri, 12 Apr 2002, Jonathan E. Paton wrote:
> Yes, it should be optimised away, but why would you do it in the first place? If
> you tell it to do something, then why should it shy away from doing what it was
> told? Optimising things that don't occur in everyday programming is a waste of
> ti
From: Elaine -HFB- Ashton <[EMAIL PROTECTED]>
> A Taylor [[EMAIL PROTECTED]] quoth:
> *>
> *>My question is where do I run these commands from - I have
> downloaded and *>un-zipped the HTML-Template fron CPAN but am having
> difficulties installing *>it. I was hoping that it woul
Hello,
I need help to parse emails for their From, UID and message text fields
from a local mailbox file (unix type). I am using Windows Me and any sort of
help in this direction would be highly appreciated. If someone can provide
some sample code, that will be really very nice.
Looking forward
Jenda,
I want to which lines are different.
Thanks,
Jerry
Jenda Krynicky wrote:
> From: Jerry Preston <[EMAIL PROTECTED]>
>
> > I want to compare one file to another. Is it better to read the files
> > line by line into an array or and hash or what is the best and or
> > fastest? These file
From: Jerry Preston <[EMAIL PROTECTED]>
> I want to compare one file to another. Is it better to read the files
> line by line into an array or and hash or what is the best and or
> fastest? These files are less than 100 lines.
Depends on what do you mean by "compare".
Do you want to get the
On a serious note... I just did a quick search on cpan (search.cpan.org)
for 'diff'
and a bunch of stuff came up.. but I never used any of it. You might want to
check Algorithm::Diff if you are diffing two files.
> -Original Message-
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Se
> > > I'm a litttle puzzled as to why max2 (foreach with if modifier) is
> > > consistently about 25% faster than max4 (foreach with ternary operator).
> > > My guess is that the difference is due to how often the assignment is
> > > done. With the if modifier, the assignment is done only when ne
On UNIX it's called diff. >8^P
> -Original Message-
> From: Jerry Preston [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 4:23 PM
> To: begginners
> Subject: comparing files
>
>
> I want to compare one file to another. Is it better to read the files
> line by line into an arr
I want to compare one file to another. Is it better to read the files
line by line into an array or and hash or what is the best and or
fastest? These files are less than 100 lines.
Thanks,
Jerry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Fri, 12 Apr 2002, Jonathan E. Paton wrote:
> > I'm a litttle puzzled as to why max2 (foreach with if modifier) is
> > consistently about 25% faster than max4 (foreach with ternary operator).
> > My guess is that the difference is due to how often the assignment is
> > done. With the if modifie
> for e.g :
>
> (not showing the new lines..)
>
>
> word1.word1.word1word2word1...word2wor
> d2word2
> .
You're gonna want to check out (in the perldoc perlre manpage) (??{ code
}), which is an example of a recursive regular expression. They have an
exampl
On Friday, April 12, 2002, at 12:38 , Raghupathy, Ramesh . wrote:
> I am sorry I was not clear in my question.
>
>The word1 and word2 may occur on different lines of the file and may
> occur in different combinations.
>
> for e.g :
>
> (not showing the new lines..)
>
>
> word1.word1.
> @fruitname = split /[,\s]+/ => ;
> ...
>@fruit{ @fruitname } = split /[,\s]+/ => $_ ;
Mr. Big "Fancy Comma" Man ;)
That's cool, an extra step of simplification... Very nicely done.
-dave
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
They should. $m has an undef value when the loop starts, which will
evaluate to 0 in numerical context. When the $m++ operation happens, $m
becomes one. Thus, the final loop will occur when $m has a value of 79, but
it will be the 80th iteration. Or did you notice something else that I
didn't
If word1 and word2 are on the same line, you could do something like this:
open(INFILE,"myfile.txt");
open(OUTFILE,">results.txt");
while(){
while($_ =~ /word1(.*)word2/g){ #get all characters between word1 and
word2, one match at a time
print OUTFILE $1."\n";
}
}
Someone else might
Those don't necessarily do the same thing, do they?:
> print "-" x 80;
Prints 80 dashes.
> > while($m < 80){
> > print "-";
> > $m++
> > }
Prints some number of dashes, 80 or less, depending on the initial value of
$m. This could be used in check printing software, etc.
(Not that I'm offering
> >> After I sent this I had a flash of enlightenment:
> >>$max = (sort {$a <=> $b} @_)[-1];
> >> May be slower, though, I don't know.
> >
> > How many times have I seen this? I mean, I've seen
> > this construct many times, and the question deserves
> > a place in the Perl FAQ.
>
> How to f
> >> my @array = (1 .. 100);
> >> my $counter = 0;
> >>
> >> for (@array) {
> >> print "index -> $counter element -> $_\n";
> >> $counter++;
> >> }
> >
> > The other approach is to use a C-style for-loop.
>
> Is there any given advantage of one over the other in
> terms of performance and/o
> I would like to find a word or character in a file and
> replace it with another word or character, while
> leaving others untouched. Currently, I am using the
> following method
>
> #!/bin/perl -Dr -w
> open(FILE,"$ARGV[0]") || die "Can't open $ARGV[0]:
> $!\n";
> open(FILE2,">$ARGV[0].spi")
Very similar approach with nice formatting.
---
use warnings;
use strict;
my (@day, @fruitname, %totals);
my $x;
open DATA, "data.txt";
@fruitname = split /[,\s]+/ => ;
while ( ) {
my %fruit;
@fruit{ @fruitname } = split /[,\s]+/ => $_ ;
$day[$
A Taylor [[EMAIL PROTECTED]] quoth:
*>
*>My question is where do I run these commands from - I have downloaded and
*>un-zipped the HTML-Template fron CPAN but am having difficulties installing
*>it. I was hoping that it would be as easy as TELNETing in to the server
*>space but I cant even do t
perldoc perlipc
IPC - InterProcess Communication
It's a trick devil of a subject, lots of restrictions (OS) and bugs (also
OS) when you delve too deep.
> -Original Message-
> From: Tirthankar C. Patnaik [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 2:34 PM
> To: Nikola Jance
Thanks a lot. Your guess was right. The second part was what I needed. I am
still not a little confused about the first, though. They do not teach
this in the institution where I study. :)
Could you give a good reference to this things, IPC, pipes, fifo, sockets,
etc? I could not make much head
Hi All,
I have a file which has several occurances of word1 and word2
interspersed with other text. I need to extract only the text which is
contained between consecutive occurances of word1 and word2 in that order.
Is it possible to write a pattern match for this ?
Thanks,
Ramesh
--
To un
no... Open2 opens 2 filehandles for a command.
this:
open2(*READ, *ZIPIT, "/apps/bin/zip $FORM{'zipfile'} -@ 2>&1");
opens a filehandle READ that the command reads from AND
opens a filehandle ZIPIT that the command outputs from
at a command prompt this is what it means:
cat | /apps/bin/zip som
> did you try reading the docs? You didn't even try to use my example.
I did try. I could not understand your example. Let me explain:
> > > open2(*READ, *ZIPIT, "/apps/bin/zip $FORM{'zipfile'} -@ 2>&1");
> > > READ is the input pipe
> > > ZIPIT is the output pipe
Here, are *READ, and *ZIPI
On Thursday, April 11, 2002, at 05:09 , Jeff 'japhy' Pinyan wrote:
>> my @array = (1 .. 100);
>> my $counter = 0;
>>
>> for (@array) {
>> print "index -> $counter element -> $_\n";
>> $counter++;
>> }
>
> The other approach is to use a C-style for-loop.
Is there any given advantage of one
did you try reading the docs? You didn't even try to use my example.
perldoc IPC::Open2
> -Original Message-
> From: Tirthankar C. Patnaik [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 1:52 PM
> To: Nikola Janceski
> Cc: [EMAIL PROTECTED]
> Subject: RE: Input | Program | Outp
I'm afraid I couldn't succeed in using the IPC::Open2 module. Where am I
going wrong?
# }
my($IN,$OUT);
open(OUT,"| discretise ${delta} ${BOD} ${EOD}") || die "Sorry out: $!";
if($suffix eq ".par"){
open(IN,"<$ParseFile") || die "Sorry: $!";
open2('IN','OUT');
}
Jonathan Paton writes:
>> After I sent this I had a flash of enlightenment:
>>$max = (sort {$a <=> $b} @_)[-1];
>> May be slower, though, I don't know.
>
> How many times have I seen this? I mean, I've seen
> this construct many times, and the question deserves
> a place in the Perl FAQ.
How
On Friday, April 12, 2002, at 10:05 , Nikola Janceski wrote:
> And why can't you do the same with the CGI module?
> $page_o_html = hidden(-name => 'crap', -value => $crap);
> would be the same thing.
>
> You lost me on that...
Mea Kulpa...
essential it's the case of
s/print/$page_o_htm
From: drieux <[EMAIL PROTECTED]>
> Given the original concern to 'retain' the "This Quote" in the
> hidden field, there is now the problem of decode_entities perchance
> more than once???
>
> original input: "This Quote"
> saved as hidden: $quot;This Quote$quot;
>
> so the
>
You might want to look at IPC::Open2
You can open a system command with an INPUT pipe and OUTPUT pipe.
Here is how I used it.
open2(*READ, *ZIPIT, "/apps/bin/zip $FORM{'zipfile'} -@ 2>&1");
READ is the input pipe
ZIPIT is the output pipe
Perl Gurus, Yeah I should have used the ZIP module.. I a
On Friday, April 12, 2002, at 09:51 , Jenda Krynicky wrote:
[..]
> Keep in mind that the user might have entered those ", <
> and others. So if you want them to survive you have to escape
> them. Even if that would mean the page will contain
>
>
>
> if the user entered
> 1 < 2
YIKE
Folks,
Consider this code snippet:
Here $ParseFile is a plain-text file, which could be gzipped, bzipped, or
not compressed at all. I'd like my program to determine this, open the
file, and cat it to another program called discretise.
In the code below,
my(@PARSELIST) = @ARGV;
And why can't you do the same with the CGI module?
$page_o_html = hidden(-name => 'crap', -value => $crap);
would be the same thing.
You lost me on that... plus if you really need to, I have ADDED the CGI at a
later point to a pre-existing script and only change the portions that I
really wanted
From: drieux <[EMAIL PROTECTED]>
> It would seem that the current CGI.pm should not
> retranslation of " into " - or am I being naive?
If CGI.pm would be made by Microsoft then it would not. And if you
needed to put into a hidden field something that already is HTML
it'll screw things up.
On Apr 10, Nikola Janceski said:
>What does the (left/right/nonassoc) mean?
They mean "left-associative", "right-associative", or "non-associative".
They govern what DIRECTION things are evaluated in.
$x + $y + $z
evaluates LEFT to right -- the ($x + $y) is done first, not the ($y + $z).
On
On Friday, April 12, 2002, at 09:09 AM, Guan Boon Lee wrote:
> I would like to find a word or character in a file and
> replace it with another word or character, while
> leaving others untouched. Currently, I am using the
> following method
>
> #!/bin/perl -Dr -w
> open(FILE,"$ARGV[0]") || di
Hi all,
Despite what the documentation says on this topic, I'm unable to have the 8th
parameter of syb_err_handler even after having set syb_show_sql to true:
use DBI;
# ---
# Errors handling
# ---
sub msg_handler_SYB {
print join ( "| ", @_), "\n";
}
$sth = $dbh_db
On Apr 12, drieux said:
>On Friday, April 12, 2002, at 09:09 , bob ackerman wrote:
>[..]
>>> $tmp = system $selection;
>>>
>>
>> try:
>> $tmp = `$selection`;
>>
>> to get back results that command sends to stdout.
>>
>>> return $tmp;
>
>what is the 'special variable' that would get set th
On Friday, April 12, 2002, at 09:09 , bob ackerman wrote:
[..]
>> $tmp = system $selection;
>>
>
> try:
> $tmp = `$selection`;
>
> to get back results that command sends to stdout.
>
>> return $tmp;
what is the 'special variable' that would get set that
would return the exit code of runn
On Friday, April 12, 2002, at 08:41 , Jenda Krynicky wrote:
[..]
> Yes, if you can use that I fully agree you should, but if you have
> some html "template" you fill in you have to make sure you escape
> your data yourself :-)
the horrors of 'maintaining' code that should have started with
CGI.p
On Friday, April 12, 2002, at 08:05 AM, Timothy A. DeWees wrote:
> Hello,
>
> I am trying to convert a shell script to perl because I need to do
> some
> binary math, and I want to add more flexibility in general.I'm a bit
> new
> to perl, but here is my question (don't laugh).
>
> I
I would like to find a word or character in a file and
replace it with another word or character, while
leaving others untouched. Currently, I am using the
following method
#!/bin/perl -Dr -w
open(FILE,"$ARGV[0]") || die "Can't open $ARGV[0]:
$!\n";
open(FILE2,">$ARGV[0].spi") || die "Can't open
On Apr 12, Timothy A. DeWees said:
>I am trying to execute an external process (in this case dialog). Dialog
>displays a menu to the user and will output there selection via stdout or
>stderr. I want to take what the system call to dialog will pass to stdout
>or stderr and assign it to a string
Howdy:
Still looking for examples / pointers ...
I am still butchering a page where I
connect to the database and get a list
of tables. That works -
My goal is to figure out how to select a
table and update the Description / input
comments for the table (and maybe - being
SUPER ambitious - a
Hello,
I am trying to convert a shell script to perl because I need to do some
binary math, and I want to add more flexibility in general.I'm a bit new
to perl, but here is my question (don't laugh).
I am trying to execute an external process (in this case dialog). Dialog
displays a men
Hi everybody,
I set up a database (MySQl) for our intranet that holds all the
articles written by our journalists. You can do the usual things edit
articles, insert new articles and search for articles. The search
function is a very plain, full text search for single or multiple
words, and se
From: drieux <[EMAIL PROTECTED]>
> On Friday, April 12, 2002, at 07:55 , Jenda Krynicky wrote:
>
> > No it will not.
>
> just figured that out
> [..]
> > This is the safest method:
> >
> > use HTML::Entities;
> > $hiddenField = encode_entities(param('hiddenField'));
> >
> > $html
exellent Jenda .. thats spot on.
exactly what i was looking for.
thanx to you all for your help it was much apreciated
-
Kris G Findlay
http://www.knight-shift.com
- Original Message -
From: "Jenda Krynicky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, A
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 10:28 AM
> To: [EMAIL PROTECTED]
> Subject: Mod_Perl -- A very basic question to get started
>
>
>
> Hello Friends,
>
> I have all the web-development done in ASP for W2K with IIS
On Friday, April 12, 2002, at 07:55 , Jenda Krynicky wrote:
> No it will not.
just figured that out
[..]
> This is the safest method:
>
> use HTML::Entities;
> $hiddenField = encode_entities(param('hiddenField'));
>
> $html = qq{ value="$hiddenfield">};
>
> Jenda
I think
On Thu, 11 Apr 2002, Bryan R Harris wrote:
> > ACK! void use of map!
> Huh? Is that "void" or "avoid"? What's wrong with map?
void. You're using map in void context here (which means, if I'm not
mistaken, you throw the return value away without using it), and this
is said to be a Bad Thing (tho
I am trying to install HTML::Template into a local directory and it seems
that i have to use the following:
perl Makefile.PL PREFIX=/path_to_your_home \
INSTALLPRIVLIB=/path_to_your_home/lib/perl5 \
INSTALLSCRIPT=/path_to_your_home/bin \
INSTALLSITELIB=/path_to_your_home/lib/perl5/si
From: drieux <[EMAIL PROTECTED]>
> On Friday, April 12, 2002, at 07:15 , Kris G Findlay wrote:
>
> > ok exact problem !!
> >
> > Example data inputed via form :
> > 'here is a quote "this Quote".' # which is passes to variable
> > $document
> >
> > if i use hidden fields in a html form to st
... or try Email::Sendmail
luke
On Wed, 10 Apr 2002 15:33:10 -0400
fliptop <[EMAIL PROTECTED]> wrote:
> t3tsu0 wrote:
>
> > Where:
> >
> > $mail_prog= '/usr/bin/sendmail';
> >
> >
> > sub send_mail {
> > local($from,$to_name,$to_addr,$subject,$content) = @_;
> > ope
On Friday, April 12, 2002, at 07:15 , Kris G Findlay wrote:
> ok exact problem !!
>
> Example data inputed via form :
> 'here is a quote "this Quote".' # which is passes to variable
> $document
>
> if i use hidden fields in a html form to store these variables while the
> page displays a p
From: James Campbell <[EMAIL PROTECTED]>
> >Is anybody use any free Regexp tester?
> >Like in the OptiPerl - but it's non-free... :(
>
> Don't know how complicated OptiPerl is but if you just want to see
> what your regex is matching:
>
For things like this I use PSH : http://Jenda.Krynicky.cz
Hello Friends,
I have all the web-development done in ASP for W2K with IIS Web-Servers and
am a newbie to mod_perl. I have a very basic question on this Perl
technology. Here it is:
What is the primodial or **chief use** of mod_perl with apache?
--Is it to run CGI Scri
again.. you should have used the CGI module... it would have no problems
with that.
#!perl
use strict;
use warnings;
use CGI qw(:standard);
print header();
if(param()){
print param('crap'), p();
} else {
print start_form();
my $crap = 'here is a quote "
ok exact problem !!
Example data inputed via form :
'here is a quote "this Quote".' # which is passes to variable $document
if i use hidden fields in a html form to store these variables while the
page displays a preview
eg print ""
the html page returned displays corectly and all data is i
Here's one way:
my @path = split /;/,$ENV{PATH};
foreach(@path){
chdir $_;
if(-e 'net.exe'){
print "Application found in $_!\n";
}
}
-Original Message-
From: Jorge Goncalvez
To: [EMAIL PROTECTED]
Sent: 4/12/02 6:15 AM
Subject: RE:search an executable in path
HI, I wante
On Friday, April 12, 2002, at 01:32 , [EMAIL PROTECTED] wrote:
> It's a method invocation arrow, used for object orientated code. Try
> perlboot for help (http://www.perldoc.com/perl5.6.1/pod/perlboot.html)
not all '->' are OO method invocations as David Grey's most
elegant code pointed out:
Take the single quotes off of $nhtmlpage.. the variable isn't being
interpolated.
Cheers,
Kevin
On Fri, Apr 12, 2002 at 08:56:15AM -0400, FLAHERTY, JIM-CONT
([EMAIL PROTECTED]) said something similar to:
> I am wanting to send HTML reports to clients that can read html mail.
> In the Data secti
On Friday, April 12, 2002, at 03:56 , Mark. wrote:
> apples, melon, oranges, pears, coconut, lemons, grapefruit
> 4, 3, 2, 7, 1, 4, 0
> 3, 1, 4, 4, 0, 0, 1
> 0, 4, 0, 0, 4, 5, 0
http://www.wetware.com/drieux/CS/lang/Perl/Beginners/FruitPickFromCVS.txt
offers an illustration about how this prob
> my $msg = MIME::Lite->new(
>From => '[EMAIL PROTECTED]'
> ,
>To => '[EMAIL PROTECTED]'
> ,
>Cc => '[EMAIL PROTECTED]' ,
>Subject=> 'Morning Trouble Call report',
>Type => 'text/html',
>Data => '$rhtmlpage'
>
> );
>
> $msg->se
> OK!
>
> my script works! But when I use:
>
> my $rvar = ;
>
> I have the same problem! Jesus, that's a hard one :-)
After you read it in, do you have a '$' in the string? If so, you need
to escape it like so:
$rvar =~ s/\$/\\\$/g;
That should fix the problem. If it doesn't, could you paste
> If I only want to get the numbers sold for lets say apples,
> oranges and
> grapefruit, for both stores How would I go about it?
>
>
> apples, oranges, pears, lemons, grapefruit
> 5, 0, 4, 6, 2
> 2, 6, 2, 0, 0
> 4, 7, 2, 1, 0
>
>
> apples, melon, oranges, pears, coconut, lemons, grape
uh... Are you using the CGI module?
This test CGI script can take 'hello " what?'
and when submitted will return the exact same thing.
What kinda problem are you really having?
#!perl
use strict;
use warnings;
use CGI qw(:standard);
print header();
if(param()){
print param('crap'), p();
HI, I wanted to know if the Win32 executable net.exe is on Path.
How can I do this in Perl?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Friday, April 12, 2002, at 04:30 , Kris G Findlay wrote:
> i'm writing a script that takes data submited by a form and adds it to a
> mysql database
> but i would like to be able to preview the data as it is to be displayed
> before final submission to database. i have tried using hidden for
you are using single quotes '' which don't interpolate. use double quotes
"".
> -Original Message-
> From: FLAHERTY, JIM-CONT [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 8:56 AM
> To: Jim (E-mail); Beginners (E-mail)
> Subject: Help with MIME::Lite module
>
>
> I am wantin
I am wanting to send HTML reports to clients that can read html mail.
In the Data section is where you put the body of the message . If I type
html and text it works fine. but when I try to add a variable the body
of the message has
$nhtmlpage
nothing on whats in the variable. Help
co
On Thursday, April 11, 2002, at 01:53 , Mike wrote:
> If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi
> jkl mno
>
> Is there a variable which would contain the arguments?
yes @ARGV - in your case you would be able to play something like
my $count=1;
f
On Friday, April 12, 2002, at 04:59 , Wim wrote:
> OK!
>
> my script works! But when I use:
>
> my $rvar = ;
>
> I have the same problem! Jesus, that's a hard one :-)
are you expecting a single line of input to come at you?
if not why not 'nest' it in a line read cycle
while() {
OK!
my script works! But when I use:
my $rvar = ;
I have the same problem! Jesus, that's a hard one :-)
Greetz...
David Gray wrote:
>>An update on previous post...
>>It seems that I typed some errors :-(
>>
>>This is a small rewrite of my script...
>>#!/usr/bin/perl
>>
>>use warnings;
>>
>>
i'm writing a script that takes data submited by a form and adds it to a mysql
database
but i would like to be able to preview the data as it is to be displayed
before final submission to database. i have tried using hidden form fields within a
prieview page
but have a problem of these fields
try visual regex here is link .. its free
http://laurent.riesterer.free.fr/regexp/
- Original Message -
From: "Kris G Findlay" <[EMAIL PROTECTED]>
To: "beginners" <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 11:50 PM
Subject: Re: RE:regex tester
>
> - Original Message
Hi
I need to know how the mail stucture
would look if I want to send data from a form
via smtp instead of using the PRINT statement
I need to use this
$MAIL->datasend("or more lines\n");
How would I define the the form variables like username
would it look like this?
$MAIL>datasend("$userna
Hello all,
I've got an intresting little dunno how or where to start:
Lets say, I've got numerous Comma Separated Values, for this example
lets say they contain information about fruit sales for different stores...
Now, there are two stores, the second store has got a wider selection than
Chris Green wrote:
>
> I'm having problems using FILE::BASENAME and the fileparse command. I've
> used the code below to try it out but get an error message saying 'Undefined
> subroutine &main::fileparse called at D:\data\parse.pl line 6'
>
> use FILE::BASENAME
Module names are Case Sensitive.
Chris,
I think perhaps a mising semi-colon and case problems could be to blame. Try
use File::Basename; #observe case
Because on a unix system FILE/BASENAME and File/Basename are different.
Tristan
You Wrote:
--
I'm having problems using FILE::BASENAME and the fileparse command. I'
Mike wrote:
>
> What happens if I call a perl script as follows:
>
> test.pl < abc
The contents of the file "abc" are directed to the standard input of
"test.pl"
> What picks up the abc inside the script? In shell scripting I would just
> use a read statement (read a). Is there a like funct
Support wrote:
>
> I am trying to understand the logic of this code, and am finding it hard
> to find any more info on it, since I can't quite grip it.
perldoc perlref
perldoc perldsc
> Could someone explain the flow and/meaning behind it?
> I am specifically referring to the 'pointers' (->) a
I'm having problems using FILE::BASENAME and the fileparse command. I've
used the code below to try it out but get an error message saying 'Undefined
subroutine &main::fileparse called at D:\data\parse.pl line 6'
use FILE::BASENAME
$record = "D:\\data\\filename.bat";
($name,$path,$suffix) =
Scott,
It's a method invocation arrow, used for object orientated code. Try perlboot for help
(http://www.perldoc.com/perl5.6.1/pod/perlboot.html)
I think O'Reilly's Advanced Perl Programming book deals with it, but you should be
able to get the jist of it from the above (and the links in the
@ARGV
in your example
$ARGV[0] will be abc
$ARGV[1] will be def
...etc
Tor.
Mike wrote:
>
> If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi
> jkl mno
>
> Is there a variable which would contain the arguments?
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> F
@ARGV is the variable ur looking for ;
here is how to assign args to vars;
while(@ARGV)
{
$var1=shift(@ARGV);
$var2=shift(@ARGV);
}
Adios
Mandar
On Thu, 11 Apr 2002, Mike wrote:
> If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi
> jkl mno
>
> Is there a va
What happens if I call a perl script as follows:
test.pl < abc
What picks up the abc inside the script? In shell scripting I would just
use a read statement (read a). Is there a like function in perl?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
1 - 100 of 102 matches
Mail list logo