On Sat, Nov 23, 2002 at 08:02:00AM +0530, [EMAIL PROTECTED] wrote:
> Hi,
> > why would you want to use Perl in the first place? no other alternatives?
> Maybe, But I am not a coder at all.
> > your problem is straight forward and if you are not familiar with Perl, you
> > might want to go with ano
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi folks,
I've configured the forum software I am writing to automatically add the
line 'Re: subjectNameHere' to the subject field when a user wishes to
reply to a post. Now I've encountered a problem, when the reply is a
reply to a previous reply:
*
Hi-
Try:
#!/usr/bin/perl
use strict;
use warnings;
my $subject = "Re: Re: Re: Re: Howdy";
print "origonal: $subject\n";
$subject =~ s/(Re:\s)+/$1/g;
print "final: $subject\n";
(tested)
Dress it up as you wish, i.e. .../gi; is a
cassless match, etc.
Aloha =>
Hi everyone,
I have a couple of questions;
1) is there a command to clear the screen from within a perl program
2) how can you send the ouptput to the printer from within a perl program
I am running perl on windows.
Thanks
-
Do you Yahoo!?
Yahoo! Mail Plus -
Hi,
> By now you will probably have worked out that this community is very
> happy to help people of any ability to improve their Perl skills, but is
> rather reluctant just to hand out ready-made solutions. This is as it
*please read the mail in full before commenting on *anything*. *
Yep, but th
Hi,
Thanks for the mail.
> perldoc -f rand
> also,
> perldoc perlop
Thanks, I will.
> If that doesn't work, try asking your professor for help.
hehehehehee, I don't have any professor. I am not a student and I never
was a computer student. I am just a artist in fashion designing who does
Linux as a
Hi All;
I'm trying to match a pattern in a text file and then print out the next
line in that file. I could swear that I've done this before by incrementing
$. to move to the next line. However, the code below is printing out the
matched line rather than the next line.
#!/usr/bin/perl
open (LO
I have a subroutine which makes a number of recursive calls and uses as
input a scalar reference from an array. I am able to retrieve the
number from the reference, however, I would also like to print out the
array and index information that was used.
Ultimately I get this:
(A) SCALAR(0x47
I am having a ton of difficulty getting this to work on my WIN32 system.
I copied the LDAPapi.PM file to the c:\perl\lib\Net folder but I still
keep getting errors. Is there something simple I am missing?
Can't locate loadable object for module Net::LDAPapi in @INC (@INC
contains: C:/Perl/lib C:/P
I have a cgi script which used to run very well. Now, after setting up
a new computer and installing a more recent version of CGI.pm I
recieve errors:
this used to be all I needed:
use CGI qw/:all *table td tr/;
to do the folowing:
print $q->start_table();
print $q->tr( $q->td());
print $
You could always say again inside your if to print the next line.
Realize that you will not then be able to check that line for the
string, but if that is ok which it sounds like it is then it should
work. See below.
Joshua Kaufman wrote:
Hi All;
I'm trying to match a pattern in a text file
Say I have:
foreach $string (@strings) {
if ($text =~ /$string/) { ... }
}
Now, it happens that the data in $string contains \|()[{$^*.? etc. that turn
into regex metacharacters within m// but I want to match them by their
literal value, not as a regex pattern. That is, now Perl terminates the
$retest = substr($linewithsubjectin,3);
if ($retest ne "Re:") {
# hasn't got Re: in
} else {
# has got Re: in
}
should work.
dan
"Gavin Laking" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi folks,
Using the following program, I managed to send a message with an attachment to
multiple recipients using option 2, but not with options 1 and 3:
>>
use Mail::Sender;
$address1 = '[EMAIL PROTECTED]';
$address2 = '[EMAIL PROTECTED]';
#$recipients
On Sat, Nov 23, 2002 at 10:45:40AM +, Jason Rauer wrote:
> Say I have:
>
> foreach $string (@strings) {
> if ($text =~ /$string/) { ... }
> }
>
> Now, it happens that the data in $string contains \|()[{$^*.? etc. that
> turn into regex metacharacters within m// but I want to match them by
Bob -
Thanks, I'll investigate that.
I'm also hoping that the list will tell me how to do it by incrementing the
proper special variable. I could swear that I've done that before, and have
found it useful in other contexts.
-- Josh
-- On 11/23/02 12:39 PM, "Mystik gotan" <[EMAIL PROTECTED]> w
Thanks for the reply.
That would work in this context, but I'm looking for the more general
answer, mostly just to convince myself that I'm not crazy and have done it
this way before.
--Josh
On 11/23/02 8:44 AM, "Wiggins d'Anconia" <[EMAIL PROTECTED]> wrote:
> You could always say again insid
Maybe you should use a foreach loop spitting every character and then
parsing the \ in front of it?
Sincerly,
Bob Erinkveld
(Webmaster Insane Hosts)
www.insane-hosts.net
From: "Jason Rauer" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Characters instead of regex patterns
Date: Sat, 2
On Sat, Nov 23, 2002 at 02:05:58PM -0600, Joshua Kaufman wrote:
> Thanks for the reply.
>
> That would work in this context, but I'm looking for the more general
> answer, mostly just to convince myself that I'm not crazy and have done it
> this way before.
I'm sorry to report that you may be c
How unfortunate for me ;-)
-- josh
On 11/23/02 2:17 PM, "Paul Johnson" <[EMAIL PROTECTED]> wrote:
> On Sat, Nov 23, 2002 at 02:05:58PM -0600, Joshua Kaufman wrote:
>
>> Thanks for the reply.
>>
>> That would work in this context, but I'm looking for the more general
>> answer, mostly just to co
Yeh I would tend to agree, based on the fact that you can have multiple
handles open at the same time. So there would have to be like a hash or
something if it were a special variable which you would have to update
for each handle, on top of that you can make a handle a lexical variable
which d
You should be able to \ them just like any other character, if that
isn't working you might try backslashing the \. Aka, \\ or even .
http://danconia.org
Mystik gotan wrote:
Maybe you should use a foreach loop spitting every character and then
parsing the \ in front of it?
Sincerly,
Bob
Hiya,
I got some basic Perl questions. Hope you don't mind answerring them?
1) What is the use of just putting $var; on 1 line? Example:
#!usr/bin/perl -wT
# some code
$var;
Does this technique rescopes the variable?
2) Why is exit() or 1; used on the LAST line. I understand it being on some
l
On Fri, 22 Nov 2002 21:21:42 -0800, [EMAIL PROTECTED] (John W. Krahn)
wrote:
>Chris wrote:
>>
>> How do I tally money with perl?
>
>Assuming that you are tallying dollars like $12,345.67, convert to cents
>(an integer) by removing all punctuation and convert back to dollars to
>print the final to
On Fri, 22 Nov 2002 21:21:42 -0800, [EMAIL PROTECTED] (John W. Krahn)
wrote:
>Chris wrote:
>>
>> How do I tally money with perl?
>
>Assuming that you are tallying dollars like $12,345.67, convert to cents
>(an integer) by removing all punctuation and convert back to dollars to
>print the final to
On Sat, Nov 23, 2002 at 06:06:12PM -0500, chris wrote:
> How do I stop the warning message
> Possible attempt to separate words with commas at
> @dollars = qw/ $12,345.67 $11,555.99 $9,765.35 $432 $876.4 /;
no warnings "qw";
It is lexically scoped.
--
Paul Johnson - [EMAIL PROTECTED]
http://ww
Hi -
Putting a value or variable alone on the last line
of a scope like:
sub something
{
blah, blah, blah...
...
1;
}
implies 'return 1;'. The subroutine (or scope) returns
the value last evaluated.
The function 'exit' or 'exit 99' does just that,
exits the script to the os (or whoever calle
Hello there list!
I am eager to hear your feedback on this script I wrote.
Its reason of being is to be ran from cron (under Linux) so it warns root
and cuts internet conenction whenever download or upload reaches a certain
limit. This because our ISP bills us $10c for every megabyte of data ove
Joshua Kaufman wrote:
>
> Hi All;
Hello,
> I'm trying to match a pattern in a text file and then print out the next
> line in that file. I could swear that I've done this before by incrementing
> $. to move to the next line. However, the code below is printing out the
> matched line rather than
I sent the following mysql query and got an error:(
SELECT ad_id, text_extra, life FROM help_wanted WHERE ad_id in(@id_set)
It prints correctly as:
SELECT ad_id, text_extra, life FROM help_wanted WHERE ad_id in(20 19 14)
but the whole idea doesn't work; what am I missing?
Mariusz
Jason Rauer wrote:
>
> Say I have:
>
> foreach $string (@strings) {
> if ($text =~ /$string/) { ... }
> }
>
> Now, it happens that the data in $string contains \|()[{$^*.? etc. that turn
> into regex metacharacters within m// but I want to match them by their
> literal value, not as a regex pa
Chris wrote:
>
> OK. I will try it. My amounts look more like this.
>
> @dollars = qw/ 12345.67 -12345.67 11555.99 -11555.99 9765.353
^^^^ ^^^
> -9765.353 432 -432 876.4 -876.4/;
^^^
You are going to have to decide if
Chris wrote:
>
> How do I stop the warning message
> Possible attempt to separate words with commas at
> @dollars = qw/ $12,345.67 $11,555.99 $9,765.35 $432 $876.4 /;
my @dollars = ( '$12,345.67', '$11,555.99', '$9,765.35', '$432 $876.4'
);
John
--
use Perl;
program
fulfillment
--
To unsubs
the list in your statement needs commas
$query = "SELECT ad_id, text_extra, life FROM help_wanted WHERE ad_id
in(".join(',', @id_set).")";
On Saturday, November 23, 2002, at 08:30 PM, Mariusz wrote:
I sent the following mysql query and got an error:(
SELECT ad_id, text_extra, life FROM help_
On Sat, 23 Nov 2002 18:44:58 -0800, [EMAIL PROTECTED] (John W. Krahn)
wrote:
>Chris wrote:
>>
>> OK. I will try it. My amounts look more like this.
>>
>> @dollars = qw/ 12345.67 -12345.67 11555.99 -11555.99 9765.353
> ^^^^ ^^^
Chris wrote:
>
> On Sat, 23 Nov 2002 18:44:58 -0800, [EMAIL PROTECTED] (John W. Krahn)
> wrote:
>
> >Chris wrote:
> >>
> >> OK. I will try it. My amounts look more like this.
> >>
> >> @dollars = qw/ 12345.67 -12345.67 11555.99 -11555.99 9765.353
> >
i'm unsure about the first question, but your answer to the 2nd one, is, if
you are using more than 1 script in your program, and you require() it, the
script that's require()'d must have 1; as the last line. this way, perl
knows it's the end of the file, and not to read any further. it returns a
"
On Sat, 23 Nov 2002 19:42:21 -0800, [EMAIL PROTECTED] (John W. Krahn)
wrote:
>
>If rounding does what you want then that should be fine. However, if
>you want to truncate this is one way to do it:
>
>my $amount = 11555.99;
>
>$amount =~ s/(?<=\.\d\d)\d+$//;
>
>
>
>John
So to put it all togeth
I'm about to start a project and I'm looking for some pointers.
Specifically, I want to create a call center/help desk/tracking system. My
idea is to use HTML and a web browser as a front end and SQL Server as the
database. The middle tier is undecided but includes a web server and of
course I w
>> On Sun, 24 Nov 2002 01:13:52, Steve Gross <[EMAIL PROTECTED]> said:
> 4) Are there any call tracking/help desk systems out there to look
> at? Thanks for any help.
Request Tracker[1] is a *very* featureful ticket tracking system using
HTML/CGI as a front-end to a database. I've used it
40 matches
Mail list logo