sanket vaidya asked:
> It would be great if some of you write a simple code which has two
> different outputs for $| = 0 & $| = 1 to demonstrate the difference.
Try this with different values for $|
#!/usr/bin/perl -w
use strict;
$| = 1;
for ( 1..20 ){
print ".";
warn "!" unless $i % 5;
Hi,
Perldoc for $| is as below:
1. If set to nonzero, forces a flush right away and after every write or
print on the currently selected output channel. Default is 0 (regardless of
whether the channel is really buffered by the system or not; $| tells you
only whether you've asked Perl expli
On Wed, May 27, 2009 at 6:27 PM, Stephen Reese wrote:
> List,
>
> I've been working on a method to parse a PDF or TXT document and
> output the results to XML over at Experts Exchange.
> http://www.experts-exchange.com/Programming/Languages/Scripting/Perl/Q_24439630.html
>
> You may view the attac
admin2 wrote:
How can I suppress the first "Use of uninitialized value in pattern
match (m//)" warning message. code and output are below.
code
# cat ./fix_archive.pl
#!/usr/bin/perl
use warnings;
use strict;
my @files = <*> unless /.mbox^/;
That line reads as:
my @files = <
How can I suppress the first "Use of uninitialized value in pattern
match (m//)" warning message. code and output are below.
code
# cat ./fix_archive.pl
#!/usr/bin/perl
use warnings;
use strict;
my @files = <*> unless /.mbox^/;
foreach my $file (@files) {
print $file . "\n";
Hi Joe,
jm wrote:
i had actually tried to include that early on but apparently the stars
weren't properly aligned just then. that works perfectly. thanks for
"making" me revisit that option. i figured it would be something
simple, just threw me off since it hasn't ever been required when i
Hello,
I used to build dynamic libraries in c (.so) that I can then call
from perl. However, in c the static libraries are more efficient
than the dynamic libraries.
So can I call a static c library from perl ?
for the dynamics library, in my Makefile.PL, I put:
LIBS=> ['-lm
List,
I've been working on a method to parse a PDF or TXT document and
output the results to XML over at Experts Exchange.
http://www.experts-exchange.com/Programming/Languages/Scripting/Perl/Q_24439630.html
You may view the attached document or if the mailing list doesn't
allow here is a copy of
> -Original Message-
> From: Kirk Wythers [mailto:kwyth...@umn.edu]
> Sent: Wednesday, May 27, 2009 10:16
> To: Wagner, David --- Senior Programmer Analyst --- CFS
> Cc: beginners@perl.org
> Subject: Re: skipping a repeated header
>
> Thanks David. I didn't include my attempts because the
> -Original Message-
> From: Kirk Wythers [mailto:kwyth...@umn.edu]
> Sent: Wednesday, May 27, 2009 09:31
> To: beginners@perl.org
> Subject: skipping a repeated header
>
> I have a large datafile that I am trying to read into a postgresql
> database. I think I have the db_connect stuff
On 5/27/09 Wed May 27, 2009 9:15 AM, "Kirk Wythers"
scribbled:
> Thanks David. I didn't include my attempts because the postgresql
> stuff took up so many lines. I have snippet out the data read part
> (including your suggestion) and pated below. As you can see I also,
> sent a number of variab
On 5/27/09 Wed May 27, 2009 2:14 AM, "Kelvin Philip"
scribbled:
> Hi,
>
> Is there any method to append a row to an existing Excel file? Can I do it
> using the Spreadsheet::WriteExcel module?
The Spreadsheet::WriteExcel (SS:WE) module will not add data to an existing
spreadsheet. If you are
Thanks David. I didn't include my attempts because the postgresql
stuff took up so many lines. I have snippet out the data read part
(including your suggestion) and pated below. As you can see I also,
sent a number of variables in the file. Again I was trying to not fill
the list with too m
On Wed, May 27, 2009 at 11:30, Kirk Wythers wrote:
> I have a large datafile that I am trying to read into a postgresql database.
> I think I have the db_connect stuff down, but I'm fighting with the part
> that reads the file to be processed. The file contains a repeating structure
> of header li
hey,
On Wed, May 27, 2009 at 10:30:37AM -0500, Kirk Wythers wrote:
> [...]
>
> I want to read in the lines that begin with the date format, but skip
> all the header stuff. Can anyone suggest a strategy for a, "if the line
> begins with , go ahead and read".
>
> Thanks in advance.
like thi
I have a large datafile that I am trying to read into a postgresql
database. I think I have the db_connect stuff down, but I'm fighting
with the part that reads the file to be processed. The file contains a
repeating structure of header lines like this:
TOA5B4WARM_CCR1000 16474
Date sent: Wed, 27 May 2009 16:50:41 +0800
Subject:Pattern match question
From: Á÷Ë(R)`Oô
To: beginners@perl.org
> Hi, All:
>
> I want to parse data from a HTML page, data like:
>
>
>
>
>
i had actually tried to include that early on but apparently the stars
weren't properly aligned just then. that works perfectly. thanks for
"making" me revisit that option. i figured it would be something
simple, just threw me off since it hasn't ever been required when i do
all the coding insid
On Wed, May 27, 2009 at 4:21 AM, Raymond Wan wrote:
>
> Hi Joe,
>
>
> jm wrote:
>>
>> then the ... code does not process correctly; it is
>> ignored unless there is a 2nd pair of tags in the print
>> statement ("perl inline html")
>
>
> In addition to Gunnar's questions, if you are still stuck,
hey,
thanks for the reply. The "-|" was the right option for me. The reason is
because I only need to get the first 4 lines of output of the external program.
"-|" was perfect because I don't have to base the stopping on time but rather
on the number of output lines. Another problem solved!!!
On Wed, May 27, 2009 at 07:24, Michael Alipio wrote:
>
> Sorry about the indention... must be the mail client i'm using.
> I need to fork because the external program I want to run inside the child
> runs infinitely. I want to have a timer running in the parent and after that,
> kill the child.
-Original Message-
From: Chas. Owens [mailto:chas.ow...@gmail.com]
Sent: Wednesday, May 27, 2009 4:52 PM
To: sanket vaidya
Cc: beginners@perl.org
Subject: Re: Question about split
On Wed, May 27, 2009 at 06:45, sanket vaidya
wrote:
> Hi all,
>
> Kindly look at the code below:
>
> use w
Sorry about the indention... must be the mail client i'm using.
I need to fork because the external program I want to run inside the child runs
infinitely. I want to have a timer running in the parent and after that, kill
the child. Without forking, I have to do a pkill myprogname
I'm reading th
On Wed, May 27, 2009 at 06:45, sanket vaidya wrote:
> Hi all,
>
> Kindly look at the code below:
>
> use warnings;
> use strict;
>
> $_ = 'Welcome to openSUSE 11.0 (X86-64) - Kernel \r (\l).';
>
> my @numbers = split /\D+/;
snip
> Why the first element of @numbers is 'blank'? Kindly explain with e
On Wed, May 27, 2009 at 05:42, Michael Alipio wrote:
>
> Hi,
>
> I have to run an external program but the program does not termination on
> some conditions, e.g, ping, will not exit unless you specify -c or some other
> circumstances.
>
>
> Now I what I want to do is:
>
> my @array;
> die "Cann
Hi all,
Kindly look at the code below:
use warnings;
use strict;
$_ = 'Welcome to openSUSE 11.0 (X86-64) - Kernel \r (\l).';
my @numbers = split /\D+/;
for (0..$#numbers)
{
print "$_ : $numbers[$_]\n";
}
Output:
0 :
1 : 11
2 : 0
3 : 86
4 : 64
Why the first element
-Original Message-
From: Kelvin Philip [mailto:kelvinphi...@gmail.com]
Sent: Wednesday, May 27, 2009 2:45 PM
To: beginners@perl.org
Subject: How to append to existing excel sheet?
>>Hi,
>>Is there any method to append a row to an existing Excel file? Can I do it
>>using the Spreadsheet:
-Original Message-
From: Kelvin Philip [mailto:kelvinphi...@gmail.com]
Sent: Wednesday, May 27, 2009 2:45 PM
To: beginners@perl.org
Subject: How to append to existing excel sheet?
Hi,
Is there any method to append a row to an existing Excel file? Can I do it
using the Spreadsheet::WriteE
Hi,
I have to run an external program but the program does not termination on some
conditions, e.g, ping, will not exit unless you specify -c or some other
circumstances.
Now I what I want to do is:
my @array;
die "Cannot fork myprog" unless (defined my $pid = fork)
if ($pid==0){
open MYPROG
Hi Joe,
jm wrote:
then the ... code does not process correctly; it is
ignored unless there is a 2nd pair of tags in the print
statement ("perl inline html")
In addition to Gunnar's questions, if you are still stuck, you need to
also clarify what "does not process correctly" mean. Obvio
You wrote on 05/27/2009 10:50 AM:
> I want to match one ... pair.
>
> my code :
>
> my $pattern = "()";
...
> but I got the whole matches instead of one ... pair each loop.
Do need to de-greedify it.
my $pattern = "()";
This should do the trick.
hth
Alex
--
To unsubscribe, e-mail: beginner
Hi,
Is there any method to append a row to an existing Excel file? Can I do it
using the Spreadsheet::WriteExcel module?
Looking forward to hear from you.
Regards,
Kelvin
Hi, All:
I want to parse data from a HTML page, data like:
YEMEN
YE
thanks John...my problem is solvedam trying to add more functionalities
to the script. Will seek help again if faced with any issue..
On Tue, May 26, 2009 at 11:31 AM, John W. Krahn wrote:
> Mihir Kamdar wrote:
>
>> Hi,
>>
>> I want to write a perl script which will get files from multiple
>
34 matches
Mail list logo