Is it possible to execute a perl script within another perl script?
I have advertisements on many of my pages of my site that are randomly
picked using a random ad script. I am creating some pages that are
dynamically being created, and I can't use ssi to pull the ads into the
page (right now on
you can make your script into a module and then call the module from
another perl script.
Is it possible to execute a perl script within another perl script?
I have advertisements on many of my pages of my site that are randomly
picked using a random ad script. I am creating some pages that
Kenneth W. Craft MCP [EMAIL PROTECTED] wrote:
:
: Is it possible to execute a perl script within another perl
: script?
:
: I have advertisements on many of my pages of my site that
: are randomly picked using a random ad script. I am creating
: some pages that are dynamically being created, and
Hi
I do not want to continue this thread to bag other users, but I do have a
number or perl books and it did take me some time to find out how to clear
an array. From the replies I got (and I thank those who did reply)
confirmed I was using ' @array=()' correctly. In the end, I found the
On Wed, 14 Jan 2004, Support wrote:
confirmed I was using ' @array=()' correctly. In the end, I found the
problem that was giving me grief. This is a good forum to subscribe to. I
save all my emails into a database (1,000s so far) so I can search back if
I have a problem.
If you have
Hi,
like this:
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
print $q-header
# do this - do that, using $q
print $q-redirect(/thanks.html);
- Jan
jdavis wrote:
Hello,
I have been able to use redirects with cgi.pm as long
as the redirect is
Hi
How do I check whether a file is in ebcdic or ascii format ?
Thanks,
Nitish
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On Tuesday 13 Jan 2004 5:05 pm, Wiggins d Anconia wrote:
On Tuesday 13 Jan 2004 3:04 pm, James Edward Gray II wrote:
On Jan 13, 2004, at 6:24 AM, Gary Stainburn wrote:
snip
I could reverse the parameter sequence so that the block type is
first, then
allow multiple block names to be
Nntp.Perl.Org wrote:
Hi
How do I check whether a file is in ebcdic or ascii format ?
Thanks,
Nitish
perldoc -f -x
That tells me how to find if a file is ascii text
if(-T $file) {
print $file is an ascii text file \n;
} else {
print Not an ascii text file \n;
}
--
To unsubscribe,
Hi ,
Ive a question to the regular expressions:
Is it possible to formulate a pattern to find all blocks with a length of x,
which contain y repeats of defined characters?
e.g. lets say: find 4 Leucins in a segment with the length of 6?
Many thanks...
--
+++ GMX - die erste Adresse für
How do I check whether a file is in ebcdic or ascii format ?
Thanks,
Nitish
perldoc -f -x
That tells me how to find if a file is ascii text
if(-T $file) {
print $file is an ascii text file \n;
} else {
print Not an ascii text file \n;
}
is there any way to tell if a
Hi
How do I check whether a file is in ebcdic or ascii format ?
Thanks,
Nitish
perldoc -f -x
That tells me how to find if a file is ascii text
if(-T $file) {
print $file is an ascii text file \n;
} else {
print Not an ascii text file \n;
}
Is there any way to
On Jan 14, 2004, at 3:25 AM, Jan Eden wrote:
Hi,
like this:
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
print $q-header
# do this - do that, using $q
print $q-redirect(/thanks.html);
Unfortunately, this doesn't work. As Randal already said,
Duan Toh wrote:
testing the use of DBI. Having a problem (highlighted in red) with using
@$_ as the topic. When I use @row the program writes records as
expected to test.txt but when I use the topic it only writes ...
in the file. I have reread documentation to see if I am using @$_
Dan Laflamme wrote:
I have a file that appears to be somewhat sorted, but is not sorted
according to the traditional unix sort. I'll give some examples, and if
anyone recgonizes the way in which the file is sorted, please let me
know. Also, since I may have to write a comparator function for
On Tuesday 13 Jan 2004 5:05 pm, Wiggins d Anconia wrote:
On Tuesday 13 Jan 2004 3:04 pm, James Edward Gray II wrote:
On Jan 13, 2004, at 6:24 AM, Gary Stainburn wrote:
snip old posts
Hi,
I've not responded to these two comments yet as my head was struggling
enough
with the read
On Jan 14, 2004, at 3:25 AM, Jan Eden wrote:
Hi,
like this:
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
print $q-header
# do this - do that, using $q
print $q-redirect(/thanks.html);
Unfortunately, this doesn't
Hi All!
I am running a multithread program and threads may stuck. I need to be able to
terminate those threads after some defined period of time. I can't use a detach
because I don't want to leave this thread run forever and I can't use join because the
thread never ends. Any ideas? Please
I understand that the eq and gt are for string comparisons but why not just
use the mathematical ones of == or . This goes for functions open ... or
compared to open .. ||
Paul Kraus
---
PEL Supply Company
Network Administrator
---
800 321-1264 Toll
Hi,
like this:
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
print $q-header
# do this - do that, using $q
print $q-redirect(/thanks.html);
- Jan
redirect() does a header like header(), the first header
that gets sent is
Hi,
(Please ignore the previous mail.)
In this example this fellow detaches all useless threads. In my case this is not an
option , because a detached thread never ends. For correct thread managing it is
enough to remove the detached thread from the list but the process will still run. I
need
On Jan 14, 2004, at 9:34 AM, Paul Kraus wrote:
I understand that the eq and gt are for string comparisons but why not
just
use the mathematical ones of == or .
Because we want Perl to magically convert our variables to whatever we
currently mean (number or string) without making us jump through
print $q-header # do this - do that, using $q
print $q-redirect(/thanks.html);
redirect() does a header like header(), the first header that gets
sent is the header, the rest is content, even if The contetn looks
just like a header.
Thanks for the correction, I have not found the time to read
Because the following has different return values:
beta alpha (is false)
beta gt alpha (is true)
alpha eq alpha (is true)
alpha == alpha (is ... I don't know, undef maybe?)
For || and or, they have different precedence rankings (so you have to adjust your
bracketing when exchanging them).
-
Is there a way to easily have emacs comment out xnumber of lines.
If something{
Then do
Else
Do
}
Alt 5 Ctrl - somecoolsequence I don't know
#If something{
# Then do
#Else
# Do
#}
Sort of perl related assuming you hackers are using 'real editor' :)
Paul Kraus
Hello folks,
If I encode a file with MIME::Base64 with the following
script, encode_base64.pl. The
question is; how do I decode the file? I use the following
script, decode_base64.pl to
decode back to the original source but that did not work.
Thank you...
[snip]
while
redirect() does a header like header(), the first header
that gets sent
is the header, the rest is content, even if The contetn
looks just like
a header.
Thanks for the correction, I have not found the time to read
CGI Programming with Perl thoroughly and did not realize
redirect
--As off Wednesday, January 14, 2004 10:34 AM -0500, Paul Kraus is
alleged to have said:
I understand that the eq and gt are for string comparisons but why
not just use the mathematical ones of == or . This goes for
functions open ... or compared to open .. ||
--As for the rest, it is mine.
On Jan 14, 2004, at 8:07 AM, Paul Kraus wrote:
Sort of perl related assuming you hackers are using 'real editor' :)
real coders of course would do
:.,5s/^/#/
because we are not afraid of vi.
8-)
Or if we are using our bbedit it is some
find and replace with grep using the selected
region
Have you tried:
rpm -ivh perl_rpm_name?
This should allow you to do an upgrade rather then remove and upgrade.
HTH.. Denis
On Tue, 13 Jan 2004, Paul Kraus wrote:
On a Linux system how can I remove the 5.6 rpm and then install the 5.8.2
from source and still maintain dependencies? If
--As off Wednesday, January 14, 2004 8:29 AM -0800, drieux is alleged
to have said:
Or if we are using our bbedit it is some
find and replace with grep using the selected
region only or in
--As for the rest, it is mine.
Actually, in BBEdit it is Tools-Un/Comment. No shortcut key by
Hi there,
I need to find out if there is a perl software,
script for loans managament. Is for a client that
give loans to their customers and want to have control
over the payments, the interest receive, etc.
Does anyone knows about any perl software for like
that ?
Thanks.
Hi there,
I need to find out if there is a perl software,
script for loans managament. Is for a client that
give loans to their customers and want to have control
over the payments, the interest receive, etc.
Does anyone knows about any perl software for like
that ?
Do you mean a
Thanks all who replied. From your post i gather that i need
to handle my redirect client sideso.
#!/usr/bin/perl
use CGI qw(:standard);
print header;
$| = 1;
print hi\n;
sleep 3; # i would actually do a lot of other stuff here
printEOF
script language=javascript
!--
Good morning!
Does anyone know if there exists a module like Logfile::Rotate that works on Win32
platforms? I am looking for something to rotate logs under Oracle, and I need some
pretty fine control to pull it off and still have Oracle happy.
Reinventing the wheel is definately not my
On Jan 14, 2004, at 11:07 AM, jdavis wrote:
Thanks all who replied. From your post i gather that i need
to handle my redirect client sideso.
#!/usr/bin/perl
use CGI qw(:standard);
print header;
$| = 1;
print hi\n;
sleep 3; # i would actually do a lot of other stuff here
printEOF
script
Paul Kraus [EMAIL PROTECTED] wrote:
Is there a way to easily have emacs comment out xnumber of lines.
If something{
Then do
Else
Do
}
Alt 5 Ctrl - somecoolsequence I don't know
#If something{
# Then do
#Else
# Do
#}
Sort of perl related assuming you
Hi, Can anyone tell me about using DProf on Win32 and to what extent I can expect
meaningful results at all.
I'm looking at the following output from DProf and it looks suspect. I'm guessing
this has to do with the lack of a high-resolution timer.
For example:
- elapsed time is
On Wed, 2004-01-14 at 10:19, James Edward Gray II wrote:
On Jan 14, 2004, at 11:07 AM, jdavis wrote:
Thanks all who replied. From your post i gather that i need
to handle my redirect client sideso.
#!/usr/bin/perl
use CGI qw(:standard);
print header;
$| = 1;
print
[EMAIL PROTECTED] (Rob Dixon) wrote:
We Unix people find we Windows people very strange
:)
...
test.pl test.txt
and
type test.txt | perl test.pl
are just two (increasingly weird) versions of
perl test.pl test.txt
We Unix people want to rip out the operating system
some times!
This should allow you to do an upgrade rather then remove and upgrade.
If it's possible to do that (and have it actually work), does that mean that
it's only on Windows (with ActiveState Perl) that Perl 5.6 and 5.8 are not
binary compatible for XS modules? If not, I would think that simply
Igor Ryaboy wrote:
Hi,
(Please ignore the previous mail.)
In this example this fellow detaches all useless threads. In my case this
is not an option , because a detached thread never ends.
this is plain wrong.
For correct thread managing it is enough to remove the detached thread
from
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Nntp.Perl.Org) writes:
Hi
How do I check whether a file is in ebcdic or ascii format ?
It rather depends on what you mean by 'ASCII'. If you were referring
to strict ASCII, the 8th bit would be clear and so, assuming you are
talking about text
(I love emacs, but vi is my tool of choice day-to-day ... much
quicker vim is even better if you have it)
Why? I started with emacs just because it happened to be the 1st I heard
about. Since you know both why does vim appeal to you over emacs? Other then
size.
--
To unsubscribe,
Hey guys/girls,
I want to make a list of structures from a file. Then once I get the
structures check to see if a particular value matches any in the list of
structurs that I have created. If there is a match then return the
pointer to the matching structure. Check the code below and let me
please disregard the spelling errors...
perlknucklehead
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On Jan 14, 2004, at 10:33 AM, Guay Jean-Sébastien wrote:
This should allow you to do an upgrade rather then remove and upgrade.
If it's possible to do that (and have it actually work), does that
mean that
it's only on Windows (with ActiveState Perl) that Perl 5.6 and 5.8 are
not
binary
Hello drieux,
the upgrade will upgrade and install the
XS compatible for 5.8.X version of the code
for all of the components that are in the RPM.
any additional perl modules that have an XS component
will need to be re-built and installed.
Exactly, that's what I was wondering about...
Paul Kraus [EMAIL PROTECTED] wrote:
(I love emacs, but vi is my tool of choice day-to-day ... much
quicker vim is even better if you have it)
Why? I started with emacs just because it happened to be the 1st
I heard
about. Since you know both why does vim appeal to you over emacs?
On Jan 14, 2004, at 10:49 AM, Paul Kraus wrote:
[..]
Why? I started with emacs just because it happened
to be the 1st I heard about. Since you know both why
does vim appeal to you over emacs? Other then size.
Not wishing to start an editor war, allow me to wander.
A part of the issue we are
Paul == Paul Kraus [EMAIL PROTECTED] writes:
Paul I understand that the eq and gt are for string comparisons but why not just
Paul use the mathematical ones of == or . This goes for functions open ... or
Paul compared to open .. ||
Because 3 == 3.0 but 3 ne 3.0
and 3 12 but 3 gt 12.
You'll
Hello,
Is it possible to dump the values of all the vars in a perl script
easily? I want to have a sub called Error that when called
will tell me the current value of all the vars in the script.
thanks,
--
jdavis [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hi ppl!
I just used CPAN for the first time and everything is FINE. :-)
After the initial configuration setup is done, it suggest me to install
Bundle::CPAN.
First of all, what is that module?
Second of, I have noticed that it installed Readline, so my CPAN shell
looks like the bash shells
On Wed, Jan 14, 2004 at 03:05:20PM -0500 Hemond, Steve wrote:
I just used CPAN for the first time and everything is FINE. :-)
After the initial configuration setup is done, it suggest me to install
Bundle::CPAN.
First of all, what is that module?
It is the very module you were using in
At 11:24 AM 1/14/04 -0800, you wrote:
...
or trying to make that one liner perl -pie ''
work right the first time...
Isn't that what the i is for (with .bak, of course)? ;-)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I use vim on a daily basis from the command line and its syntax highlighting
and color coding is very nice in my opinion.
I'm not flaming here so don't take me wrong, but I heard it said once that
knowledge of a language can never be replaced by an IDE. IDE's have always
been a put off to me, but
So true.
Steve Hemond
Programmeur Analyste / Analyst Programmer
Smurfit-Stone, Ressources Forestières
La Tuque, P.Q.
Tel.: (819) 676-8100 X2833
[EMAIL PROTECTED]
-Original Message-
From: Bradley A. Brown [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 3:57 PM
To:
On Wed, Jan 14, 2004 at 03:05:20PM -0500 Hemond, Steve wrote:
I just used CPAN for the first time and everything is FINE. :-)
After the initial configuration setup is done, it suggest me to install
Bundle::CPAN.
First of all, what is that module?
It is the very module you were
Does anyone know what this means...
code..
for ($i = 0;$i = $size; $i+=$temp){
$type= split(::,shift (@hold));
}
Warning:
Use of implicit split to @_ is deprecated at .//test.pl line 21
help, thanks
perlknucklehead
Eric Walker [EMAIL PROTECTED] wrote:
Does anyone know what this means...
code..
for ($i = 0;$i = $size; $i+=$temp){
$type= split(::,shift (@hold));
}
Warning:
Use of implicit split to @_ is deprecated at .//test.pl line 21
Because perl is expecting an array (@_) to be returned and
As far as I can see...
The split() function returns a list, not a scalar. When you tried to assign it to a
scalar, it tried to assign the result to @_ and then assign the number of items in @_
to $type. Maybe I'm wrong, someone else will probably correct me i so. In any case,
I'm almost
On Wed, 2004-01-14 at 16:17, Tim Johnson wrote:
As far as I can see...
The split() function returns a list, not a scalar. When you tried to assign it to
a scalar, it tried to assign the result to @_ and then assign the number of items in
@_ to $type. Maybe I'm wrong, someone else
On Wed, 2004-01-14 at 16:17, Tim Johnson wrote:
As far as I can see...
The split() function returns a list, not a scalar. When you tried to assign it to
a scalar, it tried to assign the result to @_ and then assign the number of items in
@_ to $type. Maybe I'm wrong, someone else
Incidently, emacs has a 'dired mode' (directory editor) which is
very nice... much like the old 'list' shareware in DOS land of the
dark past you can bring up a list of files (like 'ls -l'), then
view and selectively execute or delete all that you mark. It's
very nice, and it can also be used
Hello,
I do not have access to the sort operation. All I have is a file that is
sorted but I don't know exactly the mechanism by which it was sorted.
What I am trying to do is write a comparison function--given any two
lines in this file, return -1, 0, 1 as perl's cmp function does. I don't
--As off Wednesday, January 14, 2004 6:23 PM -0500, danl001 is
alleged to have said:
I'm thinking the way the file is sorted is something simple, yet
something I don't recgonize! As a result, you'll see that my method
is probably very over-complicated.
I have also posted some more data that is
Eric Walker wrote:
Does anyone know what this means...
code..
for ($i = 0;$i = $size; $i+=$temp){
$type= split(::,shift (@hold));
}
Warning:
Use of implicit split to @_ is deprecated at .//test.pl line 21
perldoc -f split says:
split Splits a string into a list of strings and
Daniel Staal wrote:
Quick question: is this data more representative than the data in the
first email? In particular, does set 4 from the first email actually
exist, exactly as listed, anywhere?
If this latter data is more representative I'd bet on ASCIIbetical
ordering: Compare each string
Can someone explain to me how to do multiline matching? I am trying to extract three
consecutive lines from a datafile containing multiple records like this:
Name: Bob
City: Austin
State: Texas
Address: 123 Whatever
Age: 46
Name: Jose
City: Denver
State: Colorado
Address: 118 Mystreet
Age: 28
Jose Malacara [EMAIL PROTECTED] wrote:
Can someone explain to me how to do multiline matching? I am
trying to extract three consecutive lines from a datafile
containing multiple records like this:
Check out
perldoc perlre
What you should do is look at the 'm' (multiple line) option.
On Wed, Jan 14, 2004 at 06:22:58PM -0700, Jose Malacara wrote:
Can someone explain to me how to do multiline matching? I am trying to extract three
consecutive lines from a datafile containing multiple records like this:
Name: Bob
City: Austin
State: Texas
Address: 123 Whatever
Age: 46
Thanks, Jeff. I read over the reference, but I guess I am missing the
syntax as I cannot get it to work properly. Can you point me to any
examples?
I found this example, but am having trouble translating it to my while
loop:
perl -e '$_ = {a\n{bb}\n{c\n\nc}\na\}; m({.*})m; print $'
Thanks
On 2004-01-14, jdavis [EMAIL PROTECTED] wrote:
Hello,
Is it possible to dump the values of all the vars in a perl script
easily? I want to have a sub called Error that when called
will tell me the current value of all the vars in the script.
Have you read about the perl debugger? I
--As off Wednesday, January 14, 2004 6:22 PM -0700, Jose Malacara is
alleged to have said:
Can someone explain to me how to do multiline matching? I am trying
to extract three consecutive lines from a datafile containing
multiple records like this:
Name: Jose
City: Denver
State: Colorado
danl001 wrote:
Here, the first 10 characters correspond but then the second string runs
out. Using our rule, we'd order ABC-MARKET before ABC-MARKET.ABC-MARKET,
which is wrong. I guess I could try following that rule, but if the
character position in the longer string that corresponds to the
On Jan 14, 2004, at 7:22 PM, Jose Malacara wrote:
Can someone explain to me how to do multiline matching? I am trying to
extract three consecutive lines from a datafile containing multiple
records like this:
Name: Bob
City: Austin
State: Texas
Address: 123 Whatever
Age: 46
Name: Jose
City:
--As off Wednesday, January 14, 2004 10:48 PM -0500, Dan is alleged
to have said:
Oh no! Its slower! I wrote a function implementing what is
described above and its actually slower (about 1/2 as slow) than
that huge thing I posted earlier. Does anything stand out here as
being inefficient? Here
On Wed, Jan 14, 2004 at 09:57:51PM -0600, James Edward Gray II ([EMAIL PROTECTED])
wrote:
On Jan 14, 2004, at 7:22 PM, Jose Malacara wrote:
snip
Since you've already been shown the super easy way, I'll dare to be a
little different:
#!/usr/bin/perl
use strict;
use warnings;
$/ =
Just for the sake of showing another solution (even though I'm not doing any
multi-line matching), how about:
##
use strict;
use warnings;
open(INFILE,myfile.txt) || die Couldn't open myfile.txt for writing!\n;
while(INFILE){
my %person;
$person{name} = $_;
79 matches
Mail list logo