Stefan Lidman <[EMAIL PROTECTED]> wrote:
>
> David Gerler wrote:
> >
> > Hi,
> > I have a line of text that is all uppercase and I need to change it
> > to titlecase. i.e. "THIS IS THE LINE" needs to become "This Is The
> > Line". I can make it all lower case using tr///. I have researche
"Michael Kelly" <[EMAIL PROTECTED]> wrote
> On Sat, Jan 11, 2003 at 02:00:58PM -0800, John W. Krahn wrote:
> > Rob Dixon wrote:
> > > "Michael Kelly" <[EMAIL PROTECTED]> wrote
> > > > # print out all the captured numbers
> > > > map{ print "$_\n"; } @numbers;
> > >
> > > Hi Michael.
> > >
> > > M
Hello Jenda,
JK> Why don't you open the file directly?
JK> open ($LOG,"$g_logdir/OrderServer-*.log")
JK> or die ( "Unable to open $g_logdir/OrderServer-*.log : $!");
JK> or am I misunderstanding something?
I will give that a whirl in the AM, could have sworn I tried tha
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 13, 2003 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: String Stripping?
>
>
> Hello all,
>
>I need to strip some HTML tags from a stringHowever,
> the complete tags are not consis
Hello all,
I need to strip some HTML tags from a stringHowever, the complete tags are not
consistent, so I would like to remove all the text between certain strings I
specify.regardless of what is between them!
For example:
I would like to remove all the text starting with
Jenda Krynicky wrote:
>
> From: "Yacketta, Ronald" <[EMAIL PROTECTED]>
> > I am sure someone out their in Perl land can offer a better solution
> > to the following.
> >
> > ###
> > ### slurp in all the required data for the report
> > ###
> > open ($LOG,"cat $g
Dan wrote:
>
> "John W. Krahn" <[EMAIL PROTECTED]> wrote in message
> >
> > You need to use the \b word boundary zero-width assertion.
> >
> > $variable =~ s/\b\Q$remove\E\b//g;
>
> Moving on, same subject/problem, but slightly different scenario..
> In my next variable $variable2, i have entries
Korthrun wrote:
> I have written a program in perl that collects some data and prints
> it to the screen based on parameters that are given on the command
> line (gee original idea for perl eh). Most of the time there are more
> lines in the file being printed than there are on my display. I would
Moving on, same subject/problem, but slightly different scenario..
In my next variable $variable2, i have entries:
$variable2 = "#ha #bad #cod #ba #dog";
Basically, i want to be able to remove #ba, without removing #ba from #bad,
so it ends up:
$variable2 = "#ha #bad #cod #dog";
This also needs
I have written a program in perl that collects some data and prints it to the screen
based on parameters that are given
on the command line (gee original idea for perl eh). Most of the time there are more
lines in the file being printed
than there are on my display. I would like to get it to prin
Sophia, et al
> If you know in advance the array index then use splice.
If you know only the value you want to remove (and you like map...):
#/usr/bin/perl -w
use strict;
my %compilers = (
system1 => ['compiler_a'],
system2 => ['compiler_b', 'compiler_c','compiler_d'],
system3 => ['compiler_e'],
Hey Jenda,
My MUA believes you used Pegasus Mail for Windows (v4.02a)
to write the following on Sunday, January 12, 2003 at 2:08:13 PM.
JK> Which one would you rather do? :-)
Looking back through the thread, I think we are both arguing that the
one to use is...
my $max = (sort {$b<=>$a
"Alan C." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Rob Dixon wrote:
> > "Alan C." <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >>Rob Dixon wrote:
> >>
> >>>my $last = undef;
> >>>
> >>>while (<>)
> >>
perldoc -q capitalize
/R
"David Gerler" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I have a line of text that is all uppercase and I need to change it
> to titlecase. i.e. "THIS IS THE LINE" needs to become "This Is The
> Line". I can make it al
David Gerler wrote:
>
> Hi,
> I have a line of text that is all uppercase and I need to change it
> to titlecase. i.e. "THIS IS THE LINE" needs to become "This Is The
> Line". I can make it all lower case using tr///. I have researched in
> my books and found that and the \u to for making
I'm trying to install the NMS FormMail program on a clients web site. I think
that I have done everything correctly but when I test the script I get the
following error message:
Application Error
An error has occurred in the program
close sendmail pipe failed, mailprog=[/usr/sbin/sendmail -oi -
I need to slice an array such that it gives me the first through the 4th to
last in a variable length array. I thought I could just do:
@comments[0..-4]
but Perl seems to choke on this. It's perfectly okay with a slice using two
negative #s:
@comments[-2..-4]
Anyone know why it doesn't l
Hi,
I have a line of text that is all uppercase and I need to change it
to titlecase. i.e. "THIS IS THE LINE" needs to become "This Is The
Line". I can make it all lower case using tr///. I have researched in
my books and found that and the \u to for making the next character
titlecase but
From: "Yacketta, Ronald" <[EMAIL PROTECTED]>
> I am sure someone out their in Perl land can offer a better solution
> to the following.
>
> ###
> ### slurp in all the required data for the report
> ###
> open ($LOG,"cat $g_logdir/OrderServer-*.
From: "David Eason" <[EMAIL PROTECTED]>
> What does the error "No suitable installation target for package ..."
> mean? I am using ppm 3.0.1 from perl 5.8.0 build 802.
It means that PPM did not find the right version of the module for
your version of Perl.
> ppm> describe G
Sorry I forgot to up
On Sat, Jan 11, 2003 at 02:00:58PM -0800, John W. Krahn wrote:
> Rob Dixon wrote:
> > "Michael Kelly" <[EMAIL PROTECTED]> wrote
> > > # print out all the captured numbers
> > > map{ print "$_\n"; } @numbers;
> >
> > Hi Michael.
> >
> > May I warn against using 'map' in a void context like this? I
Rob Dixon wrote:
"Alan C." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Rob Dixon wrote:
my $last = undef;
while (<>)
{
next unless defined $last;
chomp $last unless /^\./;
print $last;
} continue {
$last = $_;
}
"David Eason" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What does the error "No suitable installation target for package ..."
mean?
> I am using ppm 3.0.1 from perl 5.8.0 build 802.
>
> ppm> describe G
>
> Name: G
> Version: 4.1
>
Excellent, worked!
Cheers
Dan
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dan wrote:
> >
> > Hey, I have a slight dilemma which i'm struggling to overcome. Wondering
if
> > anyone has any ideas on this..
> >
> > I have a variable, for examp
Nicole Seitz wrote:
>
> hi there!
Hello,
> I've got a problem with a complex data structure and hope you can help me.
>
> I know that I can't have a hash whose values are arrays. So I tried to
> build a hash of references to arrays.
>
> I guess I've made some mistakes .
>
> This is what my
Dan wrote:
>
> Hey, I have a slight dilemma which i'm struggling to overcome. Wondering if
> anyone has any ideas on this..
>
> I have a variable, for example's sake, say $variable. $variable has a load
> of entries.
>
> $variable = "danneh blah dan etc danster";
>
> What i want to do, without
Hi Nicole
"Nicole Seitz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi there!
>
> I've got a problem with a complex data structure and hope you can help
me.
>
> I know that I can't have a hash whose values are arrays. So I tried to
> build a hash of refer
> if (!$ARGV[0]){
> die("you've forgotten to enter the file name\n");
> }
> if (!$ARGV[1]) {
> $n = 9; # output 10 rows by default
> }
> else {
> $n = $ARGV[1]-1;
> }
what if the user enters, "script.pl 8 " ??? This wil try to open a file 8
and dump last 9 lines of it.
if(
Hey, I have a slight dilemma which i'm struggling to overcome. Wondering if
anyone has any ideas on this..
I have a variable, for example's sake, say $variable. $variable has a load
of entries.
$variable = "danneh blah dan etc danster";
What i want to do, without having to set the entire string
"Rob Dixon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi Bryan
>
> "Bryan Harris" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > I need to slice an array such that it gives me the first through the 4th
> to
> > last in a variable
Nicole Seitz wrote:
> hi there!
>
> I've got a problem with a complex data structure and hope you can
> help me.
>
> I know that I can't have a hash whose values are arrays. So I tried
> to build a hash of references to arrays.
>
> I guess I've made some mistakes .
>
> This is what my hash
hi there!
I've got a problem with a complex data structure and hope you can help me.
I know that I can't have a hash whose values are arrays. So I tried to
build a hash of references to arrays.
I guess I've made some mistakes .
This is what my hash looks like:
%myHash = ();
# lots of code
Bryan Harris wrote:
>
> I need to slice an array such that it gives me the first through the 4th to
> last in a variable length array. I thought I could just do:
>
> @comments[0..-4]
>
> but Perl seems to choke on this. It's perfectly okay with a slice using two
> negative #s:
>
> @commen
I need to slice an array such that it gives me the first through the 4th to
last in a variable length array. I thought I could just do:
@comments[0..-4]
but Perl seems to choke on this. It's perfectly okay with a slice using two
negative #s:
@comments[-2..-4]
Anyone know why it doesn't l
34 matches
Mail list logo