Helio S. Junior writes ..
>I would like to know if it's possible to do the
>following:
>
>When the user clicks on the Refresh Button of
>Internet Explorer and my WebPage refreshes, i
>also have to 'insert' some information on the
> inside the Page. Is it possible to do
>it?
>If so, how?
>Any Samp
i have try from john lee mail. but i got problem
the message syntax error at ./test.pl line 2, near "use
CGI."
Execution of ./test.pl aborted due to compilation errors.
this mainPage (include form and variable)
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "
New Page 1
nakosu-budi wrote:
>
> i have try from john lee mail. but i got problem
> the message syntax error at ./test.pl line 2, near "use
> CGI."
> #!/usr/bin/perl -w
> use CGI.pm
This row should end with a ';'.
thus
use CGI.pm;
/Johan
--
Johan Groth (xghjn) ! Tel. mobil: 0703 - 24 25 27
Cel
On Tue, 8 May 2001, nakosu-budi wrote:
> i have try from john lee mail. but i got problem
> the message syntax error at ./test.pl line 2, near "use
> CGI."
> Execution of ./test.pl aborted due to compilation errors.
>
> --
> this nextPage.p
heysince i been subscribed to this PERL mailing list i've been seeing the message:
INBOX - 130 new messages rather too often.
I've lost the original email telling me how to unsubscribe...can somebody please
tell me how to stop italso, is there perhaps a better way of accessing this
These questions are answered in the FAQ:
http://beginners.perl.org/beginners-faq
Cheers,
Kevin
On Tue, May 08, 2001 at 02:05:26PM +0100, [EMAIL PROTECTED]
([EMAIL PROTECTED]) spew-ed forth:
>
> heysince i been subscribed to this PERL mailing list i've been seeing the
>message: INBOX - 13
I have 2 hashes, %one and %two.
the ($key, $value) of %one is a span of time.
I need to compare this span of time over every $key of %two.
Here's what I have:
while (($key1, $val1) = each (%one)) {
while (($key2, $val2) = each (%two)) {
if (($key2 >= $key1) && ($key2
Hi everyone,
I am fairly new to perl and having problems with
pulling in multiple lines from a file so I can search
those lines and if it has the expression I am looking
for then I want to return to that file and search
again for the same pattern of lines again and then
search again for the patt
Hi,
Please how do i (the actual commands) send an file (html) as an attachment using
sendmail in pelr with no MIME intalled?
Thanks in advance
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Mon, 7 May 2001, David Monarres wrote:
>
> I will qualifythis by saying that I am not an expert on MCPAN but
> it would appear that you probably do not have the module XML::Parser
> installed. Which doesn't make that much sence considering th
If you have Mail::Sender already installed then there is a specific
example showing sending a HTML attachment. If not, then I suggest that
you install it - it does a hell of a lot of the work for you.
You can get it from
http://search.cpan.org/search?mode=module&query=mail%3A%3Asender
Gary
Being a beginner myself, this might work, but someone else may have a
better solution...
$INFILE = "Your_Input_File.txt" ;
open (OUTFILE, ">Your_Output_File.txt";) or die;
open (INFILE) or die;
while ($line = )
{
chomp ($line);
if ($line =~ /(whatever expression you're looking for)/)
{
: I have 2 hashes, %one and %two.
:
: the ($key, $value) of %one is a span of time.
:
: I need to compare this span of time over every $key of %two.
:
: Here's what I have:
:
: while (($key1, $val1) = each (%one)) {
:
: while (($key2, $val2) = each (%two)) {
:
: if (($ke
On May 8, Ga Bu said:
>I am fairly new to perl and having problems with
>pulling in multiple lines from a file so I can search
>those lines and if it has the expression I am looking
>for then I want to return to that file and search
>again for the same pattern of lines again and then
>search agai
> I have 2 hashes, %one and %two.
>
> the ($key, $value) of %one is a span of time.
>
> I need to compare this span of time over every $key of %two.
>
> Here's what I have:
>
> while (($key1, $val1) = each (%one)) {
>
> while (($key2, $val2) = each (%two)) {
>
> if (($key2 >= $key1) && ($key2 <
Hello,
Anyone out there actually play with Unicode::Map8,
Unicode::String or Unicode::Map?
I don't seem to be make my code working. I am trying
to convert from a utf8 => utf16. Reading from the
document seems to imply one of the above module
should be able to help me. But, I don't understand
ho
: > I have 2 hashes, %one and %two.
: >
: > the ($key, $value) of %one is a span of time.
: >
: > I need to compare this span of time over every $key of %two.
:
: ...
:
: Look at the replies given here earlier.
: I ran some benchmarks with while and grep, and your while loop didnt look
: less e
- Original Message -
From: Ang Sei Heng <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 1:27 AM
Subject: Need help on Unicode Programming...
> This is what I did:
> -- BEGIN -
> #!/usr/bin/perl -w
>
> use Unicode::Map8;
> use Unicode::S
Hi,
What's the easy, portable way, to check the number
of bytes available in a socket ? (IO::Socket::INET).
-Robin
hello, all. i just signed onto this list, and i have to say *wow, it's active!*. just
got my first digest version, and it has over 1,400 lines in it!
well, anyway, while i hope to be able to help out and give advice and answers to many
people on this list, i have a question of my own right now.
Hi Adam,
Are you talking about doing:
sub foo {
my $arg1 = 1;
my $arg2 = 2;
my ($one, $two) = bar($arg1, $arg2);
print qq{$one and $two};
}
sub bar {
my $arg1 = shift;
my $arg2 = shift;
return ++$arg1, ++$arg2;
}
Cheers,
Kevin
On Tue, 8 May 2001, Adam Theo wrote:
> so, in short, any way i can get a subroutine to send *back* arguments
> to the piece of code that called it? all of this will be within the
> same program, i just am hoping there is a way to do this.
The last expression evaluated in a subroutine is returned
Thanks for your help,
Changing the $/ variable from "/n" to "!" for the
seperator worked great!
It reading in the lines and I am able to search that
with no problems know.
I just found that in the perl cookbook also.
Good luck everyone...
__
Sorry if this is a dumb question.. (I know, there is no such thing as a
dumb question- only questions asked by dumb people:)
I used the opendir() function in my Perl script to point to a folder with
200+ text files for the purpose of extracting data from each file.
If I run the script with ope
when i use Active Perl on Win98 PPm i get the following error when i try to use the
search command:
---
PPM> search
not well-formed at line 1, column 17, byte 17 at C:/Perl/site/lib/SOAP/Parser.pm line
73
---
what does the message "not well-formed mean" and any ideas a
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 7:54 PM
Subject: ppm error
> when i use Active Perl on Win98 PPm i get the following error when i try
to use the search command:
>
> ---
> PPM> search
>
> not well-formed at li
> [returning values from a sub?]
As other posters have said, just return a list
of some sort. Note that stuff gets flattened.
So if you do:
sub flat {
$foo = '1';
@bar = (2, 3);
$baz['4'} = 5;
return $foo, @bar, %baz, ['qux', 'waldo']
}
@list = flat;
Continuing with the problems for my 'date formatting' script.
I am reading in a complete record from a logfile. I check to see if the
regexp matches to something inside the record.
Then I want to find the what each grouped mini-regexp matched up with in
the monster one at the bottom of the email
On Tue, 8 May 2001, Craig Moynes/Markham/IBM wrote:
> $values =~ s/.*$self->{DF_REGEXP}.*/$replaceString/g;
Perhaps you actually want:
@values_arr = $values =~ /.*$self->{DF_REGEXP}.*/
This will give you an array of the atomized matches in your regexp, and
you don't need to fool around with th
Tip for those posting (or even just creating)
long regexes:
If you stick a /x on the end of a regex,
whitespace in the regex is ignored, so
you can break it up into multiple lines,
indent lines as appropriate, add spaces
where nice, and comments, etc. One
thing to remember if you do this: white
s
Carl,
Have you tried to use the globbing function rather than readdir?
my $file;
while(<*.txt>){
$file=$_; # not strictly needed, I know, but makes it clear
open(F,$file) || die "with a nice error message\n$!\n";
while(){
# do something useful with the file
}
Perfect, thanks. I think I saw that earlier ...stupid brain :)
-
Craig Moynes
Internship Student
netCC Development
IBM Global Services, Canada
Tel: (905) 316-3486
[EMAIL PROTECTED]
22 while () {
23 if (/$LOCTAG/i) {
24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i;
25 $location .= "${curloc}::";
26 }
27
28 if (/$TYPETAG/i) {
29 ($curtype) = /VALUE="([^"]+)">/i;
30 $jobtype .= "${curtype}::";
31
On Tue, May 08, 2001 at 05:24:10PM -0400, Anshu Anshu wrote:
> 22 while () {
> 23 if (/$LOCTAG/i) {
> 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i;
> 25 $location .= "${curloc}::";
> 26 }
> 27
> 28 if (/$TYPETAG/i) {
> 29 ($curtyp
On May 8, Anshu Anshu said:
> 22 while () {
>23 if (/$LOCTAG/i) {
>24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i;
>25 $location .= "${curloc}::";
>26 }
>27
>28 if (/$TYPETAG/i) {
>29 ($curtype) = /VALUE="([^"]+)">/i;
>30
On May 8, John Joseph Trammell said:
>On Tue, May 08, 2001 at 05:24:10PM -0400, Anshu Anshu wrote:
>> 22 while () {
>> 23 if (/$LOCTAG/i) {
>> 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i;
>> 25 $location .= "${curloc}::";
>> 26 }
>> 27
>> 28
Thanks for reply. below is the varibales as defined -
$LOCTAG = "";
$TYPETAG = "";
and error message was
Name "main::JOBDATA" used only once: possible typo at gen_job.pl line 14.
Name "main::CP" used only once: possible typo at gen_job.pl line 13.
Use of uninitialized value in substitution (s//
Hello.
I am attempting to find some information on using session variables in
Perl/CGI.
When someone logs into my site, the script will check a flat-text database
and if the user has entered a correct username and password, the user will
be validated. At this point, a session variable will be se
At 06:59 PM 5/8/01 -0400, Brian Shoemaker wrote:
>Hello.
>
>I am attempting to find some information on using session variables in
>Perl/CGI.
>
>When someone logs into my site, the script will check a flat-text database
>and if the user has entered a correct username and password, the user will
>b
I take it you have the CGI module installed... all you need to do is read up
on CGI::Cookies which will show you exactly how to store and retrieve
cookies. The docs can be foudn on CPAN or in your perl/html/site/lib/CGI dir
regards,
Jos Boumans
- Original Message -
From: "Brian Shoemak
On Tue, May 08, 2001 at 06:59:07PM -0400, Brian Shoemaker wrote:
: Hello.
:
: I am attempting to find some information on using session variables in
: Perl/CGI.
In a CGI environment, you might want to take a look at the CGI::Cookie
module, which comes standard with all modern versions of Perl.
At 04:00 PM 5/8/01 -0700, I wrote:
>At 06:59 PM 5/8/01 -0400, Brian Shoemaker wrote:
>>Hello.
>>
>>I am attempting to find some information on using session variables in
>>Perl/CGI.
>>
>>When someone logs into my site, the script will check a flat-text database
>>and if the user has entered a corr
from the error msg i conclude that line 29 is not producing a match. You
might want to add some print statements to see whats going on there.
if it holds meta chars like japhy said, you might also want to try
"quotemeta $_;" so you can be sure all 'special characters' are escaped for
the regex.
R
If you're using Apache, I highly recommend the O'Reilly book "Writing
Apache Modules with Perl and C" by Lincoln Stein and Doug MacEachern
(ISBN: 1-56592-567-X). A section of the book starts with a simple
authentication example and builds on it (including a couple of different
way to store sessio
Hello perl friends. I need to know if perl works with microsoft sql2000. if
it does, which module do i need to get? thanks
Marlon
Judging from the modules it should be able too...
what you need is the DBD module, as well as a driver.. which in your case
would be
DBIx-MSSQLReporter [1.00 ] An module to connect Perl to MS SQL Server and MS
if i'm not mistaken.
if you use ActiveState Perl, it shouldnt be hard to install them.
There are many ways to do it, here's mine:
I wanted to semi-securely identify users to my site, having them log in
once, and then never have the need to login again (as long as they're at the
same computer)
So, I used cookies (perldoc CGI) to set a unique session ID, once a user
had logged in.
either that or the "if (/$TYPETAG/i)" is not matching - so the block isn't
even being entered .. this would be most likely because even if the match on
line 29 doesn't match .. line 30 should still initialise $jobtype to (at the
very least) '::'
so my guess is that $TYPETAG doesn't appear on the
Carl Rogers writes ..
>I used the opendir() function in my Perl script to point to a folder
>with 200+ text files for the purpose of extracting data from each file.
>
>If I run the script with opendir/readdir pointing to a directory on a
>shared drive, I'll get to a point where Perl tells me "Can
[EMAIL PROTECTED] writes ..
>Please how do i (the actual commands) send an file (html) as
>an attachment using sendmail in pelr with no MIME intalled?
I can't remember what options you need to give to sendmail .. and I don't
have sendmail here to test .. but you'll get the idea
open MAIL, '
Not sure if this will help you at this point, but I strongly recommend the
Date::Manip module for anything involving parsing dates. It does everything you can
imagine with dates and more. Tell it to parse your dates, and boom you can print
them however you want, get differences, etc. There are ple
If you're using Unix (I think even a dos shell can do this sort of thing too), why
couldn't you just do a system call to the shell?
i.e. system(" export MY_Variable=whatever ");
I haven't tried this, but it sure seems like it would work -- provided you're
running and exiting the script as the sa
Okay, here is some more info on the error messeges:
- the file, formparser.cgi, has 755 permissions
- the message -
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to compl
> [error](2)No such file or directory. exec of /usr/local/apache/cgi-bin/
> formparser.cgi failed
> [error][192.168.1.8] Premature end of script headers: /usr/local/apache/
> cgi-bin/formparser.cgi
> - I see the file DOES exist as formparser.cgi in the directory path shown
> in the er
54 matches
Mail list logo