Thanks to everyone for their input!
So I've tried out many of the methods, first making sure that each
works as I intended it.
Which is, I'm not concerned with multi-line text, just single line
data. That said, I have noted
that I should use \A and \z in general over ^ and $.
I wrote a 176 byte
I want to retrieve an excel spreadsheet (eventually several at
different locations) and display the contents in a web page.
if i copy the file locally ive got everything working as expected.I
cant retrieve the file and do the same though.
if i do this with a local file it works
#!/usr/bin/perl
From: "Mike Blezien"
> Hello,
>
> were using the XML/Simple module to process a XML response using the code
> below.
> But for some reason the module can't read the $xmlresponse data unless we
> create
> a temp file first to store the data then pass that to the module. Is th
- Original Message -
From: "Robert Wohlfarth"
To: "Perl List"
Sent: Tuesday, December 22, 2009 5:47 PM
Subject: Re: XML::Simple question
On Tue, Dec 22, 2009 at 9:54 AM, Mike Blezien wrote:
were using the XML/Simple module to process a XML response using the code
below. But for s
On Tue, Dec 22, 2009 at 9:54 AM, Mike Blezien wrote:
> were using the XML/Simple module to process a XML response using the code
> below. But for some reason the module can't read the $xmlresponse data
> unless we create a temp file first to store the data then pass that to the
> module. Is there
Aimee Cardenas wrote:
Ok, All,
Hello,
I'm a little confused. How does your outputs from die and print differ
when you put either $! or $? at the end of the statement? I've been
using $! at the end of my die statements and am afraid that I've been
unknowingly not using the correct syntax
Aimee Cardenas wrote:
> Ok, All,
>
> I'm a little confused. How does your outputs from die and print differ
> when you put either $! or $? at the end of the statement? I've been
> using $! at the end of my die statements and am afraid that I've been
> unknowingly not using the correct syntax be
Ok, All,
I'm a little confused. How does your outputs from die and print
differ when you put either $! or $? at the end of the statement?
I've been using $! at the end of my die statements and am afraid that
I've been unknowingly not using the correct syntax because my code
never dies!
Parag Kalra wrote:
You can try following:
$_ =~ s/^\.(\s)+//g;
You are using capturing parentheses but you are not using the results of
that capture anywhere so why use them? You are using capturing
parentheses in LIST context so even if there are multiple whitespace
characters you are onl
Marc Perry wrote:
Hi,
Hello,
I noticed that most beginner texts will introduce and use print like this:
print $moose, $squirrel, $boris, "\n";
However, when I review code from CPAN, I often (typically) see:
print $bullwinkle . $rocky . $natasha . "\n";
As I recall, print is a list operato
Vishnu wrote:
I was going through the book intermediate perl and came across the
following code.
my @odd_digit_sum = grep digit_sum_is_odd($_), @input_numbers;
sub digit_sum_is_odd {
my $input = shift; > what are we doing here?
my @digits = split //, $input; # Assu
> Bryan R Harris wrote:
>
>>> perl -wle '
>>>
>>> sub inc{ ++$_ for @_ }
>>>
>>> my @x = 1 .. 5;
>>>
>>> inc @x;
>>>
>>> print "@x";
>>> '
>>> 2 3 4 5 6
>>
>>
>> FYI, the reason we wanted a reference was because the data set might end up
>> being huge.
>
> FYI, there i
Hello,
were using the XML/Simple module to process a XML response using the code below.
But for some reason the module can't read the $xmlresponse data unless we create
a temp file first to store the data then pass that to the module. Is there a way
to do this without having to create a temp f
Thanks Philip for sharing this excellent piece of information.
Cheers,
Parag
On Tue, Dec 22, 2009 at 8:17 PM, Philip Potter wrote:
> 2009/12/22 Parag Kalra :
> > You can try following:
> >
> > $_ =~ s/^\.(\s)+//g;
>
> This isn't quite right.
>
> There are two ways in which you might use this
On Tue, Dec 22, 2009 at 8:51 AM, Johnson, Reginald (GTS) <
reggie_john...@ml.com> wrote:
> Is there a module that I can use that will tell me the number of Saturdays,
> or any weekday, if I give it the month and year.
>
> The Date::Manip module has methods for calculating recurring dates (like
"e
Philip Potter wrote:
> 2009/12/22 Parag Kalra :
>> You can try following:
>>
>> $_ =~ s/^\.(\s)+//g;
>
> This isn't quite right.
>
> There are two ways in which you might use this substitution: either $_
> will contain a single line, or it will contain multiple lines. The
> single line case might
Shlomi Fish wrote:
> Of course, setting it to anything but the default is a sure fire way to break
> practically most production code out there , and "Perl Best Practices"
> recommends against setting it. But it may be useful in one-liners / small
> scripts / golfs / obfuscations / etc.
If you'
Is there a module that I can use that will tell me the number of
Saturdays, or any weekday, if I give it the month and year.
Reginald Johnson
TSM Backup & Restore Services
<>
Jacksonville, FL
904.218.4620
--
This message
2009/12/22 Parag Kalra :
> You can try following:
>
> $_ =~ s/^\.(\s)+//g;
This isn't quite right.
There are two ways in which you might use this substitution: either $_
will contain a single line, or it will contain multiple lines. The
single line case might look something like this:
while (<>)
On Tuesday 22 Dec 2009 15:01:47 Jenda Krynicky wrote:
> From: Marc Perry
>
> > I noticed that most beginner texts will introduce and use print like
> > this:
> >
> > print $moose, $squirrel, $boris, "\n";
> >
> > However, when I review code from CPAN, I often (typically) see:
> >
> > print $bullw
From: Marc Perry
> I noticed that most beginner texts will introduce and use print like this:
>
> print $moose, $squirrel, $boris, "\n";
>
> However, when I review code from CPAN, I often (typically) see:
>
> print $bullwinkle . $rocky . $natasha . "\n";
>
> As I recall, print is a list operat
Hi,
I noticed that most beginner texts will introduce and use print like this:
print $moose, $squirrel, $boris, "\n";
However, when I review code from CPAN, I often (typically) see:
print $bullwinkle . $rocky . $natasha . "\n";
As I recall, print is a list operator (and therefore the comma syn
You can try following:
$_ =~ s/^\.(\s)+//g;
Cheers,
Parag
On Tue, Dec 22, 2009 at 10:59 AM, Jim Green wrote:
> Hi,
>
> I have a text file with lines like this
>
>
> · Experience in C/C++ realtime system programming
>
> · Experience in ACE, FIX
>
>
> Could anybody tell me whic
>
>
> my $input = shift; > what are we doing here?
>
First input paramter to the subroutine is getting shifted i.e getting stored
in the variable '$input'
> $sum += $_ for @digits; -> what exactly is the
> .
>
All the elements of the array '@digits' are ge
Hi Dr. Ruud! (and all).
See below for my response.
On Monday 21 Dec 2009 22:03:07 Dr.Ruud wrote:
> Bryan R Harris wrote:
> >> perl -wle '
> >>
> >> sub inc{ ++$_ for @_ }
> >>
> >> my @x = 1 .. 5;
> >>
> >> inc @x;
> >>
> >> print "@x";
> >> '
> >> 2 3 4 5 6
> >
> > FYI, the r
I was going through the book intermediate perl and came across the
following code.
my @odd_digit_sum = grep digit_sum_is_odd($_), @input_numbers;
sub digit_sum_is_odd {
my $input = shift; > what are we doing here?
my @digits = split //, $input; # Assume no nondigit
cha
A pox on gmail's "reply" not sending to list.
2009/12/22 Erez Schatz :
> 2009/12/21 Vishnu :
>> I was going through the book intermediate perl and came across the
>> following code.
>
> I'm not familiar with the scope of Intermediate Perl, but from your
> questions it would seem that you should've
Bryan R Harris wrote:
perl -wle '
sub inc{ ++$_ for @_ }
my @x = 1 .. 5;
inc @x;
print "@x";
'
2 3 4 5 6
FYI, the reason we wanted a reference was because the data set might end up
being huge.
FYI, there is no issue.
Uh, come to think of it, I'm surprised your scr
Hi,
I have a text file with lines like this
· Experience in C/C++ realtime system programming
· Experience in ACE, FIX
Could anybody tell me which regex to use to get rid of the dot and the
leading spaces before each Line?
Thanks for any help!
Jim
--
To unsubscribe, e-ma
I was going through the book intermediate perl and came across the
following code.
my @odd_digit_sum = grep digit_sum_is_odd($_), @input_numbers;
sub digit_sum_is_odd {
my $input = shift; > what are we doing here?
my @digits = split //, $input; # Assume no nondigit
c
30 matches
Mail list logo