On Fri, 15 Apr 2011 08:53:12 -0700, sono-io wrote:
> On Apr 15, 2011, at 8:37 AM, Alan Haggai Alavi wrote:
>
>>> open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n";
>>>
>>> Is that O.K.?
>>
>> You are still using a bareword filehandle.
>
> Putting single quotes around t
On 11-04-15 11:22 AM, sono...@fannullone.us wrote:
open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n";
Is that O.K.?
The problem with not using lexical-scoped file handles is that if a
module opens a file using the same name, it closes yours. It's best if
you limit the
On Apr 15, 2011, at 8:37 AM, Alan Haggai Alavi wrote:
>> open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n";
>>
>> Is that O.K.?
>
> You are still using a bareword filehandle.
Putting single quotes around the filehandle allows it to pass Perl
Critic, so I was just cu
Hello Marc,
What about writing it like this:
open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n";
Is that O.K.?
You are still using a bareword filehandle.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference
--
To unsubscribe, e-mail: beginners-un
On Apr 15, 2011, at 2:11 AM, Shlomi Fish wrote:
> 1. Don't use bareword file-handles.
>
> 2. Use the three-args open:
>
> open (my $file_our, '>>', 'cmdout') or die "Cannot open cmdout: $!";
What about writing it like this:
open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \
Hi jet speed,
On Friday 15 Apr 2011 00:23:17 jet speed wrote:
> Hi,
>
> I need help in formatting ouput from system command, i could'nt figure out
> a way to format output from system command. appreciate your help with
> this, the details are below.
>
> hlis3 is
Hi,
I need help in formatting ouput from system command, i could'nt figure out a
way to format output from system command. appreciate your help with this,
the details are below.
hlis3 is file with list of clients
hosta
hostb
hostc
hostd
The below program looks through each client and ou
Hi,
I need help in formatting ouput from system command, i could'nt figure out a
way to format output from system command. appreciate your help with this,
the details are below.
hlis3 is file with list of clients
hosta
hostb
hostc
hostd
The below program looks through each client and ou
On 9/18/07, VUNETdotUS <[EMAIL PROTECTED]> wrote:
snip
> I liked Text::Table idea but it is not supported on my machine.
> Now I try printf but I came across a few problems. The sample above
> produces a good result. However, when I implement according to my
> needs, I cannot printf my multidimensi
On Sep 17, 7:57 pm, [EMAIL PROTECTED] (Chas Owens) wrote:
> On 9/17/07, VUNETdotUS <[EMAIL PROTECTED]> wrote:> I print some output in
> PERL. It is data in 3 columns. I use \t to add
> > a tab space to make a column.
> > However, \t may not produce the desired result. If the value is short
> > in
On Sep 18, 12:57 am, [EMAIL PROTECTED] (Chas Owens) wrote:
> On 9/17/07, VUNETdotUS <[EMAIL PROTECTED]> wrote:> I print some output in
> PERL. It is data in 3 columns. I use \t to add
> > a tab space to make a column.
> > However, \t may not produce the desired result. If the value is short
> > in
On 9/17/07, VUNETdotUS <[EMAIL PROTECTED]> wrote:
> I print some output in PERL. It is data in 3 columns. I use \t to add
> a tab space to make a column.
> However, \t may not produce the desired result. If the value is short
> in length, next column is not aligned correctly in the row. Something
>
> -Original Message-
> From: VUNETdotUS [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 17, 2007 12:36
> To: beginners@perl.org
> Subject: Format Output
>
> I print some output in PERL. It is data in 3 columns. I use \t to add
> a tab space to make a colum
I print some output in PERL. It is data in 3 columns. I use \t to add
a tab space to make a column.
However, \t may not produce the desired result. If the value is short
in length, next column is not aligned correctly in the row. Something
like this:
123 12345 123456
123 12345 1234
On Mon, 2006-15-05 at 17:46 -0700, chen li wrote:
> Hi all,
>
> I get data from Data::Dumper in an array format.
> I just wonder if there is a means to format the
> content in alphabetic order, something like "sort keys
> or sort values".
Data::Dumper can output hashes sorted by keys:
$Data::D
Hi all,
I use the following script to find out the methods
available from a class of Bio::Seq.
#!c:/Perl/bin/Perl.exe
use warnings;
use strict;
use Bio::Seq;
use Data::Dumper;
use Class::Inspector;
my $methods=Class::Inspector->methods('Bio::Seq',
'full','public');
print Data::Dumper->Dump([$m
Jeff Pang schreef:
> print Dumper @sort;
I always go for the whole thing:
print Data:Dumper->Dump( [EMAIL PROTECTED], [qw(*sort)] );
perl -MData::Dumper -e '
@s = sort( 1, 7, 3, 2, 5 ) ;
print Data::Dumper->Dump( [ [EMAIL PROTECTED] ], [ qw(*s) ] )
'
@s = (
1,
2,
3,
>Jeff Pang wrote:
>
>: my @original=(...);
>: my @sort=sort {$a cmp $b} @original;
>: print Dumper @sort;
>
>You might like the results better using an array reference.
>
>print Dumper [EMAIL PROTECTED];
>
Sorry,my mistake.It's right really to use an array reference here.
--
Jeff Pang
NetEas
Jeff Pang wrote:
: my @original=(...);
: my @sort=sort {$a cmp $b} @original;
: print Dumper @sort;
You might like the results better using an array reference.
print Dumper [EMAIL PROTECTED];
Or you could avoid the extra array with the anonymous array
constructor (or is it an operator?
>
>I get data from Data::Dumper in an array format.
>I just wonder if there is a means to format the
>content in alphabetic order, something like "sort keys
>or sort values".
I would give you a simple way,you can sort the array and put the results into
another array,then print this array to Dump
Hi all,
I get data from Data::Dumper in an array format.
I just wonder if there is a means to format the
content in alphabetic order, something like "sort keys
or sort values".
Thanks,
Li
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best
Uh, never mind. I expected the output to display to STDOUT. When I opened
the 'rpt' file, voila! there sat my report.
- Original Message -
From: "Brian Warn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 3:50 PM
Subject: repor
Hello,
I'm trying to do something fairly simple: read in colon-delimited data from a file
and output it to the screen first. After that is OK, I want to send it in an email.
The syntax checks out OK, but nothing outputs. Does anyone see what I'm missing?
Thanks,
Brian
-
23 matches
Mail list logo