On Wed, 28 Aug 2013 12:34:40 -0400
Harry Putnam wrote:
> Good thinking thanks. It might not really apply here though.
> I'm no kind of data manager... just a homeboy hillbilly.
>
> What I had in mind is writing to a single log file that is dated on
> the file name for each run of the program.
On 28/08/2013 19:06, John W. Krahn wrote:
Rob Dixon wrote:
use strict;
use warnings;
use autodie;
my $rsync = 'rsync';
my $tmplog = 'one.log';
my $tmplog2 = 'two.log';
my %logs = map {
open my $FH, '>>', $_;
What if open fails?!
I have `use autodie`.
Rob
--
To unsubscribe, e-mail: begi
Rob Dixon wrote:
On 27/08/2013 23:06, John W. Krahn wrote:
my %logs = (
'one.log' => undef,
'two.log' => undef,
);
for my $name ( keys %logs ) {
open my $FH, '>>', $name or die "Cannot open '$name' because: $!";
$logs{ $name } = $FH;
}
for my $log_FH ( values %logs ) {
print $log_FH "kdkdkdk
On Wed, 28 Aug 2013 12:34:40 -0400
Harry Putnam wrote:
> That sounds quite a bit like what cron could do with this hmm.
Or use a hard link to preserve the file.
--
Don't stop where the ink does.
Shawn
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional c
Shawn H Corey writes:
> On Wed, 28 Aug 2013 10:42:30 -0400
> Harry Putnam wrote:
>
>> Thanks to all other posters.. lots of good input.
>
> It seems to me that recording the same information is many places is a
> design flaw. If you have the same information in two or more places, it
> will get
On Wed, 28 Aug 2013 10:42:30 -0400
Harry Putnam wrote:
> Thanks to all other posters.. lots of good input.
It seems to me that recording the same information is many places is a
design flaw. If you have the same information in two or more places, it
will get out of sync. Write the program that w
Rob Dixon writes:
> On 27/08/2013 23:06, John W. Krahn wrote:
>> Harry Putnam wrote:
[...]
>>> (Simplified for discussion, from a longer script)
>>>
>>>my $rsync = 'rsync';
>>>my $tmplog = 'one.log';
>>>my $tmplog2 = 'two.log';
>>>open(LOG,">>$tmplog")or die "Can't open $tmplog
There are some good answers here so far, but I'd like to recommend a
logging module like Log::Log4perl. If your script is more than a run-once
throwaway, proper logging will almost certainly be of benefit.
Metacpan: https://metacpan.org/module/Log::Log4perl
FAQ:
http://log4perl.sourceforge.net
Jim,
*much* better. I did a search for something like that before I wrote
what I did, but I guess I didn't get the search terms right, because I
didn't find it.
Very cool
Nathan
>
> On Aug 27, 2013, at 2:14 PM, Harry Putnam wrote:
>
>>
>> I happen to be scripting something that needs to have
On 27/08/2013 23:06, John W. Krahn wrote:
Harry Putnam wrote:
I happen to be scripting something that needs to have two logs written
to and was sort of taken by how awkward this construction looked:
(Simplified for discussion, from a longer script)
my $rsync = 'rsync';
my $tmplog = 'one
On Aug 27, 2013, at 2:14 PM, Harry Putnam wrote:
>
> I happen to be scripting something that needs to have two logs written
> to and was sort of taken by how awkward this construction looked:
>
(snipped)
Check out the IO::Tee module from CPAN. I have not used it, but it is mentioned
in severa
See reply below, please
>
> I happen to be scripting something that needs to have two logs written
> to and was sort of taken by how awkward this construction looked:
>
> (Simplified for discussion, from a longer script)
>
> my $rsync = 'rsync';
> my $tmplog = 'one.log';
> my $tmplog2 = 't
Harry Putnam wrote:
I happen to be scripting something that needs to have two logs written
to and was sort of taken by how awkward this construction looked:
(Simplified for discussion, from a longer script)
my $rsync = 'rsync';
my $tmplog = 'one.log';
my $tmplog2 = 'two.log';
open(
On 2012-09-05 12:47, jet speed wrote:
output
---
abc-12 20/1
def-22 30/22
ghi-33 40/3
def-22 20/1
@array1 ="abc-12, def-22, ghi-33,abc-12,def-22";
@array2 ="20/1, 30/22, 40/3, 20/1";
i did try to map array1 to array2 elements, did'nt work.
%hash = map {$array1[$_] => $array2[$_] } (0
Thanks Sholmi. Appreciate your help !. that's correct, i did make up the
syntax, bec's the actual program is in a different system, were i cannot
access mail.
Cheers
Sj
On Wed, Sep 5, 2012 at 12:10 PM, Shlomi Fish wrote:
> Hi jet speed,
>
> On Wed, 5 Sep 2012 11:47:41 +0100
> jet speed wrot
Hi jet speed,
On Wed, 5 Sep 2012 11:47:41 +0100
jet speed wrote:
> Hi All,
>
> I would like to print array1 with array2 as below ex:
>
> output
> ---
> abc-12 20/1
> def-22 30/22
> ghi-33 40/3
> def-22 20/1
>
The best way would be to iterate over the indexes:
for my $idx (0 .. $#arr
the exit status
please suggest
regards
irfan
From: Irfan Sayed
To: Jim Gibson ; Perl Beginners
Sent: Thursday, July 28, 2011 12:06 PM
Subject: Re: print output on console at runtime
can this be happen if command needs to be executed on remote machine and the
can this be happen if command needs to be executed on remote machine and the
output needs to be forked on the local console at runtime
please suggest
regards
irfan
From: Jim Gibson
To: Perl Beginners
Sent: Wednesday, July 13, 2011 12:00 PM
Subject: Re
At 12:27 AM -0700 7/13/11, Irfan Sayed wrote:
thanks John and Jim
but, is this solution is applicable to only "find" command ?
No.
if i change the command to some other system command , will this
solution work?
Yes.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional c
PM
Subject: Re: print output on console at runtime
You chose to allow Jim Gibson (jimsgib...@gmail.com) even though this message
failed authentication
Click to disallow
Irfan Sayed wrote:
hi,
Hello,
i need to print the output of a command on the console at runtime
lets say, i need to execute find command .as of now , what i am doing is ,
@cmd= `find . -name "abc"`;
print "@cmd\n";
now what happens is, once the command completed then it will send entire ou
At 10:46 PM -0700 7/12/11, Irfan Sayed wrote:
hi,
i need to print the output of a command on the console at runtime
lets say, i need to execute find command .as of now , what i am doing is ,
@cmd= `find . -name "abc"`;
print "@cmd\n";
now what happens is, once the command completed then it wil
You can use system command inside perl
system(" find . -iname 'abc'");
--
Shekar
On Wed, Jul 13, 2011 at 11:16 AM, Irfan Sayed wrote:
> hi,
>
> i need to print the output of a command on the console at runtime
> lets say, i need to execute find command .as of now , what i am doing is ,
>
> @cmd
On 09/02/2011 21:52, gry wrote:
[[v5.8.8 built for x86_64-linux-thread-multi]
#!/usr/bin/perl -W
use Getopt::Long;
my $dml = 0;
my $iterations = 10;
my %options = ("dml!" => \$dml,
"iterations=i" => \$iterations);
GetOptions(%options) || die "bad options";
printf "dml=$dml\n";
p
On Feb 9, 8:13 pm, shawnhco...@gmail.com (Shawn H Corey) wrote:
> On 11-02-09 04:52 PM, gry wrote:
>
>
>
> > [[v5.8.8 built for x86_64-linux-thread-multi]
> > #!/usr/bin/perl -W
> > use Getopt::Long;
> > my $dml = 0;
> > my $iterations = 10;
>
> > my %options = ("dml!" => \$dml,
> > "ite
gry wrote:
[[v5.8.8 built for x86_64-linux-thread-multi]
#!/usr/bin/perl -W
use Getopt::Long;
my $dml = 0;
my $iterations = 10;
my %options = ("dml!" => \$dml,
"iterations=i" => \$iterations);
GetOptions(%options) || die "bad options";
printf "dml=$dml\n";
That should be eithe
On 11-02-09 04:52 PM, gry wrote:
[[v5.8.8 built for x86_64-linux-thread-multi]
#!/usr/bin/perl -W
use Getopt::Long;
my $dml = 0;
my $iterations = 10;
my %options = ("dml!" => \$dml,
"iterations=i" => \$iterations);
GetOptions(%options) || die "bad options";
printf "dml=$dml\n";
On Sat, Nov 13, 2010 at 05:43:21AM -0500, Uri Guttman wrote:
> > "MM" == Mike McClain writes:
> MM> Could someone tell me why there is a comma printed after the newline?
> because you put it there. the \n is input to the map, not the print!
> map's last arg is a list and it takes @list AND
> "MM" == Mike McClain writes:
MM> mike@/deb40a:~/perl> perl -we '
MM> @list=qw/Perl is cool./;print( "list=\t", map { "$_," } @list, "\n");
MM> '
MM> list= Perl,is,cool.,
MM> ,mike@/deb40a:~/perl>
MM> Could someone tell me why there is a comma printed after the newline?
becau
On Oct 23, 6:45 pm, shlo...@iglu.org.il (Shlomi Fish) wrote:
> Hi KA B,
>
> On Friday 22 October 2010 21:12:29 KA B wrote:
>
> > I`m trying to get the filehandler 1 and 2 to print the result in one
> > line.
>
> It's filehandles - not filehandlers.
>
> > The script i have made makes 2 lines.
>
> >
Hi KA B,
On Friday 22 October 2010 21:12:29 KA B wrote:
> I`m trying to get the filehandler 1 and 2 to print the result in one
> line.
It's filehandles - not filehandlers.
> The script i have made makes 2 lines.
>
> The script goes like this:
>
>
> my ($sec,$min,$hour,$mday,$mon,$year,$wday,$
Thanks all
it worked.
--Irfan
From: Dr.Ruud
To: beginners@perl.org
Sent: Wed, August 18, 2010 12:35:57 AM
Subject: Re: print string in file
Irfan Sayed wrote:
> print MYFILE "\n" where MYFILE is a
> file
>handler.
s/handler/handle/
Irfan Sayed wrote:
print MYFILE "\n"
where MYFILE is a file handler.
s/handler/handle/
print $MYFILE qq{\n};
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 10-08-17 07:59 AM, Irfan Sayed wrote:
Hi All,
I need to print some string into the file.
the string is like this : ""
i have written code like this :
print MYFILE "\n" where MYFILE is a file
handler.
if i run this code , it is giving so many syntax errors.
any advice please
Regards
Irfan
From: Irfan Sayed
> I need to print some string into the file.
> the string is like this : ""
>
> i have written code like this :
> print MYFILE "\n" where MYFILE
is a file
> handler.
>
> if i run this code , it is giving so many syntax errors.
> any advice please
You can't have unescaped q
matt wrote:
my @hits = grep /$input/, ;
quotemeta:
my @hits = grep /\Q$input/, ;
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Nov 28, 2:21 pm, paik...@googlemail.com (Dermot) wrote:
> 2009/11/28 raphael() :
>
>
>
> >> 2009/11/28 raphael() :
> >> > Hi,
> >> Hi,
>
> >> > # records.txt
> >> > 25.11.2009 NAME_0
> >> > 15.12.2006 NAME_3
> >> > 20.10.2007 NAME_1
> >> > 01.01.2008 NAME_3 <-- This whole
raphael() wrote:
I want to print the last entry by record "" in this file "records.txt"
grep ^ records.txt |tail -n1
perl -ne '$s=$_ if/^/}{print$s' records.txt
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@
2009/11/28 raphael() :
>> 2009/11/28 raphael() :
>> > Hi,
>> Hi,
>>
>> > # records.txt
>> > 25.11.2009 NAME_0
>> > 15.12.2006 NAME_3
>> > 20.10.2007 NAME_1
>> > 01.01.2008 NAME_3 <-- This whole line should be printed.
>> > 10.10.2008 NAME_4
>> >
>> > Using while in a whi
2009/11/28 raphael() :
> Hi,
Hi,
> # records.txt
> 25.11.2009 NAME_0
> 15.12.2006 NAME_3
> 20.10.2007 NAME_1
> 01.01.2008 NAME_3 <-- This whole line should be printed.
> 10.10.2008 NAME_4
>
> Using while in a while loop matching ( m// ) I get all the entries
> havin
Philip Potter wrote:
2009/11/4 David Lee :
[...]
Anyway, your explanation was useful and gives us sufficient to decide how to
address our local use of these numbers. (In our case, they are
human-oriented accumulated byte-counts, for which we don't actually need
that significance/precision.)
Philip Potter wrote:
I would guess that these numbers are being stored in floats, and that
these floats are 64-bit double precision, with 53 bits of mantissa.
That means that there are just under 16 decimal digits of precision in
these numbers. print and friends seem to automatically print no mo
2009/11/4 David Lee :
> Many thanks for the reply.
>
> Following the initial surprise, my main concern was that attempts to unearth
> a description or explanation (i.e. documentation) for the observed behaviour
> was so tricky. For instance, there was nothing obvious in the relevant
> parts of "Pr
2009/11/3 David Lee :
> Although I've used perl for many years, I've just been surprised (in the
> unpleasant sense) by a recent event. Given a variable, say "$int", which is
> a growing integer, I would expect "print $int" to print it as a simple
> integer; indeed it usually does so. But when it
h3xx wrote:
I find it's easier (and in this case totally doable) if you make
something like this:
for my $count (10 .. 0) {
You can't do that in Perl. The range operator has to have the smaller
number on the left and the larger number on the right otherwise it will
return an empty list and
On Tue, 2009-01-06 at 06:23 -0800, h3xx wrote:
> I find it's easier (and in this case totally doable) if you make
> something like this:
>
> for my $count (10 .. 0) {
> printf STDERR "%2d seconds remaining...\n", $count;
> sleep 1;
> print STDERR "\e[A";
> }
>
> ^ "\e[A" is the VT-100 code
I find it's easier (and in this case totally doable) if you make
something like this:
for my $count (10 .. 0) {
printf STDERR "%2d seconds remaining...\n", $count;
sleep 1;
print STDERR "\e[A";
}
^ "\e[A" is the VT-100 code to move the cursor up one line.
^ Also, expanding the number of se
On Sun, Jan 4, 2009 at 23:11, Eric Krause wrote:
snip
> Thank you for the reply, but I tried \b and that was one of the escape
> characters activeState perl has trouble with.
snip
What version of ActivePerl are you using? I just tested this code
against build 1004 (Perl 5.10) on WinXP SP3 and it
On Sun, Jan 4, 2009 at 22:36, Mr. Shawn H. Corey wrote:
snip
> my $Backup_Count = 0;
>
> sub back_and_print {
> my $text = shift @_; # no tabs, no newlines!
>
> print "\b" x $Backup_Count;
> print " " x $Backup_Count;
> print "\b" x $Backup_Count;
> $Backup_Count = length $text;
> print $te
Mr. Shawn H. Corey wrote:
On Sun, 2009-01-04 at 19:33 -0700, bft wrote:
Hello all,
I am on a windows box and I am trying to have a count down timer print
out the seconds remaining without new lining it. i.e. I do not want a
screen that looks like this...
19 seconds remaining
18 seconds r
On Sun, 2009-01-04 at 19:33 -0700, bft wrote:
> Hello all,
> I am on a windows box and I am trying to have a count down timer print
> out the seconds remaining without new lining it. i.e. I do not want a
> screen that looks like this...
>
>
> 19 seconds remaining
> 18 seconds remaining
> 17 ...
Cathy wrote:
my $lines = 0;
my $current_line = 0;
my $percentage;
my $percentage_new;
open(my $FILE, "<", @ARGV[0]) or die "Can't open log file: $!";
while (sysread $FILE, $buffer, 4096) {
$lines += ($buffer =~ tr/\n//);
}
print "$lines lines\n";
close $FILE or die "$in: $!";
open
On Fri, 2008-11-21 at 15:13 -0800, [EMAIL PROTECTED] wrote:
> Is there any way I can get rid of that pesky number and just have the
> $var string printed?
No. Substitution returns the number of substitutions made. Only match
will return the matches.
--
Just my 0.0002 million dollars worth
Jeff Pang schreef:
> Ruud:
>> X-post alert: clpm.
>
> what does this mean?
http://groups.google.co.uk/groups?as_q=wholething&as_ugroup=comp.lang.perl.misc&as_uauthors=april
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
> Message du 11/10/08 14:57
> De : "Dr.Ruud"
> A : beginners@perl.org
> Copie à :
> Objet : Re: print /! get a newline
>
>
> X-post alert: clpm.
>
what does this mean?
Regards,
Jeff.
Créez votre adresse électronique [EMAIL PROTECTED]
1 Go d'e
X-post alert: clpm.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Dave Thacker wrote:
I want to print a line of 50 "-"'s to a file. This is my non-working syntax.
#!/usr/bin/perl
open (FOO, "foo.out");
print FOO repeat(50,"-");
close FOO;
Undefined subroutine &main::repeat called at ./foo.pl line 4.
Whats the correct syntax for doing this?
print FOO '-'
On Jun 30, 5:38 pm, [EMAIL PROTECTED] (Rob Dixon) wrote:
> onlineviewer wrote:
>
> > Can someone tell me the proper syntax to print out the value in a
> > reference?
> > Thank you.,,
>
> I'm not sure what you mean. Look:
>
> > my $string = '';
> > open my $scalar_fh, '>>', \$string;
>
> So you have
onlineviewer wrote:
>
> Can someone tell me the proper syntax to print out the value in a
> reference?
> Thank you.,,
I'm not sure what you mean. Look:
> my $string = '';
> open my $scalar_fh, '>>', \$string;
So you have opened a file handle to append to the scalar $string.
> my $log_message =
onlineviewer wrote:
Hello All,
Hello,
Can someone tell me the proper syntax to print out the value in a
reference?
I assume you mean how to dereference a reference?
perldoc perlref
Thank you.,,
my $string = '';
open my $scalar_fh, '>>', \$string;
my $log_message = "here is my string..
2008/3/13, Jenda Krynicky <[EMAIL PROTECTED]>:
>
> From: "obdulio santana" <[EMAIL PROTECTED]>
> > 2008/3/12, Jenda Krynicky <[EMAIL PROTECTED]>:
> > >
> .
.
I see. Sorry. Properly set is not enough when it comes to Windows. MS
> Windblows uses two encodings. For reasons I would love to
From: "obdulio santana" <[EMAIL PROTECTED]>
> 2008/3/12, Jenda Krynicky <[EMAIL PROTECTED]>:
> >
> > From: "obdulio santana" <[EMAIL PROTECTED]>
> > > I want to show some áéíóú or ~n ~N in my program but I dont know how to
> > print
> >
> > > it in a properly way;
> > >
> > > perl -e "print \"algo
2008/3/12, Jenda Krynicky <[EMAIL PROTECTED]>:
>
> From: "obdulio santana" <[EMAIL PROTECTED]>
> > I want to show some áéíóú or ~n ~N in my program but I dont know how to
> print
>
> > it in a properly way;
> >
> > perl -e "print \"algodón\n\""
> >
>
> > algod 3/4 n
> >
> > thanks in advance.
>
>
From: "obdulio santana" <[EMAIL PROTECTED]>
> I want to show some áéíóú or ~n ~N in my program but I dont know how to print
> it in a properly way;
>
> perl -e "print \"algodón\n\""
>
> algod 3/4 n
>
> thanks in advance.
I'm afraid you'll have to tell us what operating system you use.
The proble
I do not know if this helps you (I am a Perl beginner, too -
previously i used Java where I did not have problems with character
encoding), but when I needed to print out some special Czech symbols
(ěščřžýáíéďťň etc.), I had to tell Perl to use an utf8 encoding.
use utf8;
binmode (STDIN, 'utf8');
On Jan 29, 5:55 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On Jan 29, 2008 2:03 AM, <[EMAIL PROTECTED]> wrote:
> snip> Sorry, I missed the "^" for the regexp ^A+
>
> snip
>
> The ^ should only be used if you were to use Perl regexes, and even
> then your expression would not match anything but s
On Jan 29, 2008 2:03 AM, <[EMAIL PROTECTED]> wrote:
snip
> Sorry, I missed the "^" for the regexp ^A+
snip
The ^ should only be used if you were to use Perl regexes, and even
then your expression would not match anything but strings that held
"A"s (+ matches the last character 1 or more times).
On Jan 28, 6:11 pm, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On Jan 28, 2008 4:12 PM, <[EMAIL PROTECTED]> wrote:
>
> > I have a table "customer_table" with the following fields:
>
> > Id int,
> > firstname varchar(64),
> > lastname varchar(64),
> > emailaddress varchar(64) not null primary key
> >
On Jan 28, 2008 4:12 PM, <[EMAIL PROTECTED]> wrote:
> I have a table "customer_table" with the following fields:
>
> Id int,
> firstname varchar(64),
> lastname varchar(64),
> emailaddress varchar(64) not null primary key
> city varchar (32),
>
> Can some one help me and show me how to print only
[EMAIL PROTECTED] wrote:
Hello,
I try to print (get) a specific text selection from a text file,
but I don't know how to do it:
What I try todo is to open a file search a string and print
the follow lines from that string until he found a white line. then
he need to stop. so c
On Jan 9, 4:36 am, [EMAIL PROTECTED] (Jonay Herrera) wrote:
> Hello,
>
> I try to print (get) a specific text selection from a text file,
> but I don't know how to do it:
> What I try todo is to open a file search a string and print
> the follow lines from that string until he foun
> #!/opt/perl/bin/perl -w
> use strict;
>
> #variable
>
> my @horcm_file;
>
>
> sub readdata{
> open(HORCM, "/etc/horcm10.conf") || die ("File error");
> @horcm_file = ;
> chomp(@horcm_file);
> close(HORCM);
> return(@horcm_file);
> }
>
> my @pipo=readdata();
>
> foreach (@pipo){
>
On Aug 4, 2:45 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> [EMAIL PROTECTED] wrote:
> > I am new in perl. i want print 2 valuable in same line but my script
> > it print split into 2 line. if i hard code will work. i dont
> > understand why is happen. can some please explain to me thanks,
>
> >
[EMAIL PROTECTED] wrote:
I am new in perl. i want print 2 valuable in same line but my script
it print split into 2 line. if i hard code will work. i dont
understand why is happen. can some please explain to me thanks,
#!/usr/bin/perl
print "which client\n";
$a = <>;
$db = <>;
$dir="/u1/data/$a"
On 8/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I am new in perl. i want print 2 valuable in same line but my script
> it print split into 2 line. if i hard code will work. i dont
> understand why is happen. can some please explain to me thanks,
>
> #!/usr/bin/perl
> print "which client\n
> -Original Message-
> From: Wagner, David --- Senior Programmer Analyst --- WGO
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 28, 2007 3:31 PM
> To: Brian Volk; Brian Volk; beginners@perl.org
> Subject: RE: print if variable matches key
>
> >
>
> -Original Message-
> From: Brian Volk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 28, 2007 12:24
> To: Brian Volk; beginners@perl.org
> Subject: RE: print if variable matches key
>
>
>
> > -Original Message-
> > From: Brian Vol
> -Original Message-
> From: Brian Volk [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 28, 2007 1:34 PM
> To: beginners@perl.org
> Subject: print if variable matches key
>
> Hello,
>
>
>
> I'm trying to print a tab delimited file based on a colon separated file
> matching a key
Hi,
You just need to print the table lines in a loop when you're querying the datas
from db.
for example,maybe you can write it like:
print "";
while(my $sql_line_ref = $sth->fetchrow_hashref) {
print qq {$sql_line_ref->{key1}
$sql_line_ref->{key2}
On Wed, 2006-08-30 at 00:16 -0400, Ron McKeever wrote:
> I am tring to use part of someones elses code that creates a data file which
> prints
> out like this:
>
> ip|result|deptA|data
> ip|result|deptB|data
> ip|result|deptC|data
If you can ignore efficiency (not run very often...) then you can
Ron McKeever wrote:
> I am tring to use part of someones elses code that creates a data file which
> prints
> out like this:
>
> ip|result|deptA|data
> ip|result|deptB|data
> ip|result|deptC|data
>
> My goal instead of having all the data in one big file is to loop this and
> create
> a file fo
On 08/29/2006 06:32 PM, Ron McKeever wrote:
I am try to use part of someones elses code that creats the data file which
prints out like this:
ip|result|deptA|data
ip|result|deptB|data
ip|result|deptC|data
My goal instead of having all the data in one big file is to loop this and create a file
It works for me, but it sounds like '[A-Z][a-z]+' might not be doing
what you think.
That says "One upper-case letter followed by one or more lower-case
letters." I can see one problem with that right now. I live in Santa
Clara, which won't match because it has a space in it. But this
matched:
Hi,
Does anybody know how can run a perl file from java?
I already tried with following command:
try {
Runtime r = Runtime.getRuntime();
String cmdLine[] = { "/usr/bin/perl","c:/link41a/linkparser2.pl"};
r.exec(cmdLine);
But, I doesn't work.
Currently I am using jdk 1.4.
thanks in
thanks, it works.
On 6/15/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote:
On Thu, 2006-15-06 at 10:04 +0800, Ken Perl wrote:
> hi,
> To print Greek small letter alpha in a html page, I tried to print
> this in perl but not work,
> B1;
>
> could someone give me some clue how to make this work?
On Thu, 2006-15-06 at 10:04 +0800, Ken Perl wrote:
> hi,
> To print Greek small letter alpha in a html page, I tried to print
> this in perl but not work,
> B1;
>
> could someone give me some clue how to make this work?
Yes ... I think so.
How about: α
--
__END__
Just my 0.0002 million d
Hi
>Hi Kaushal
>The only alternative I can think of is to convert your chm file to pdf
>or rtf and then attempt a print.
>You can get the convert from
>http://www.freedownloadscenter.com/Best/free-chm-to-pdf.html
>Also can you please send me the chm file?
>It can be quite handy to me.
I th
Hi Kaushal
The only alternative I can think of is to convert your chm file to pdf
or rtf and then attempt a print.
You can get the convert from
http://www.freedownloadscenter.com/Best/free-chm-to-pdf.html
Also can you please send me the chm file?
It can be quite handy to me.
Thanks
Prasann
Hi Kaushal,
On 5/18/06, Kaushal Shriyan wrote:
I have perl.chm file Learning Perl, How do i print all the chapters
and all pages in
the perl.chm file
How did you get the book in .chm format? I only know of it being
available on paper and on safari.oreilly.com. It's a great book (I
learned from i
file.
-Original Message-
From: Bedanta Bordoloi, Gurgaon [mailto:[EMAIL PROTECTED]
Sent: Monday, May 08, 2006 2:24 AM
To: badrinath chitrala; beginners@perl.org
Subject: RE: print file
Try this:
open(FILE,"f:/file.txt") || print("open() failed as file did not
exis
Try this:
open(FILE,"f:/file.txt") || print("open() failed as file did not exist.\n");
while (){
print $_;
}
Bedanta
-Original Message-
From: badrinath chitrala [mailto:[EMAIL PROTECTED]
Sent: Monday, May 08, 2006 2:46 PM
To: beginners@perl.org
Subject: print file
Hi
open F
badrinath chitrala wrote:
> Hi
Hello,
> open FILE, "file.txt" or die $!;
open() creates the filehandle FILE which is associated with the contents of
the file "file.txt".
> while ()
You are using a file glob to get a list of file names which is the same as
doing:
while ( defined( $_ = glob '
badrinath chitrala <[EMAIL PROTECTED]> asked:
> open FILE, "file.txt" or die $!;
> while ()
>
> Sombody please tell me why do i get the message as below if i
> want to print the contents of text file
I would suggest you use the three argument open, i.e.
OPEN FILE, '<', $file or die "Can
On Sat, 18 Feb 2006 16:20:10 +0800, Ken Perl wrote:
> The "DB::OUT" filehandle is opened to /dev/tty, regardless of where
> STDOUT may be redirected to, so it's impossible to print the
> interactive debugging info into a file?
> I tried 'x @session >/tmp/data' in the debugger and didn't work.
Why
Brian Volk wrote:
>
> Is it possible to open a file and print to a specific location in the file?
> For example, I have a 1K file and 0 - 511 is where the small description is
> stored and starting in position 512 is the path to a pdf file If I do
> not have the path in position 512 the lin
-Original Message-
From: Brian Volk
Sent: Monday, August 01, 2005 11:03 AM
To: Beginners (E-mail)
Subject: print to a specific location in a file
Hi All~
Is it possible to open a file and print to a specific location in the file?
For example, I have a 1K file and 0 - 511 is where t
ok perl people... I chnaged my code from
>> use strict;
>> use warnings;
>> my $dev = qw/original1/;
>> my $dev1 = qw/clinical1/;
>> my $fout = qq(/usr/local/log/fuji.out);
>>
>> open (OUT, "+>$fout") || die "unable to open file: $fout $!";
>> open (FOO, "samcmd a $dev 2>\&1 |" )
> "David" == David <[EMAIL PROTECTED]> writes:
David> /\s(\d+)/,
David> $diff += $1 * $MyMult;
Never never never NEVER NEVER use $1 without testing whether
the match worked or not.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 009
[EMAIL PROTECTED] wrote:
"John W. Krahn"
[ Please TRIM your posts! ]
[EMAIL PROTECTED] wrote:
Does anyone know the answer to:
I took away the + from the print and I had some errors, why is the +
infront of the split needed in Perl?
I looked
[EMAIL PROTECTED] wrote:
All,
Hello,
Here is my code:
use strict;
use warnings;
my $dev = qw/original1/;
my $dev1 = qw/clinical1/;
Why are you creating a list and then assigning it to a scalar?
my $fout = qq(/usr/local/log/fuji.out);
Why use double quotes on a string that has nothing to interpola
1 - 100 of 245 matches
Mail list logo