>
> Well, the problem with perlform is: it expects a certain number of column.
>
> My question to you is: is the number of cell type constant or is it
> indeterminate?
>
> If it's indeterminate then it's better to stick with print, or printf
> if you want some formatting.
Cell is indeterminate. Al
On Sun, Oct 16, 2011 at 8:10 AM, Shlomi Fish wrote:
> On Sun, 16 Oct 2011 07:59:00 -0500
> Chris Stinemetz wrote:
>
>> On Sat, Oct 15, 2011 at 2:40 PM, Leo Susanto wrote:
>> > CELL,CDM 1,CDM 2
>> > 20, 2, 0
>> > 21, 0, 1
>> >
Well, the problem with perlform is: it expects a certain number of co
On Sun, 16 Oct 2011 07:59:00 -0500
Chris Stinemetz wrote:
> On Sat, Oct 15, 2011 at 2:40 PM, Leo Susanto wrote:
> > CELL,CDM 1,CDM 2
> > 20, 2, 0
> > 21, 0, 1
> >
> >>
>
> Any advice on how to apply the results to a perlform mechenism?
>
Simple: don't use perlform, but one of the superior and
On Sat, Oct 15, 2011 at 2:40 PM, Leo Susanto wrote:
> use strict;
> my %CELL;
> my %CELL_TYPE_COUNT;
> while (my $line = ) {
> if ($line =~ /CELL\s+(\d+)\s+(.+?),.+?HEH/) { # take CELL number into
> $1 and the information after the number (and before the first comma)
> into $2
>
Thank you everyone for your suggestions. They were very helpful!
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Oopss my error! chomp $cell in the code above should be chomp $line. thanks
> Hi Chris,
> Check this if it helps.
>
>
> #!\usr\bin\perl -w
> use strict;
> use Carp;
>
>
> my( $Cell,$CBR,$CDM1,$CDM2,$CDM3,$TFU1,$TFU2,$CCU,$EVM,$TXAMP,$CTRM )
>
> =('Cell','CBR','CDM1','CDM2','CDM3','TFU1','TFU2','CCU','EVM','TXAMP','CTRM');
> my $header='HR 17-21 HEH Report';
>
>croak "
Hi Chris,
Check this if it helps.
#!\usr\bin\perl -w
use strict;
use Carp;
my( $Cell,$CBR,$CDM1,$CDM2,$CDM3,$TFU1,$TFU2,$CCU,$EVM,$TXAMP,$CTRM )
=('Cell','CBR','CDM1','CDM2','CDM3','TFU1','TFU2','CCU','EVM','TXAMP','CTRM');
my $header='HR 17-21 HEH Report';
croak "please, specify input fil
use strict;
my %CELL;
my %CELL_TYPE_COUNT;
while (my $line = ) {
if ($line =~ /CELL\s+(\d+)\s+(.+?),.+?HEH/) { # take CELL number into
$1 and the information after the number (and before the first comma)
into $2
$CELL{$1}{$2}++;
$CELL_TYPE_COUNT{$2}++;
use strict;
my %CELL;
my %CELL_TYPE_COUNT;
while (my $line = ) {
if ($line =~ /CELL\s+(\d+)\s+(.+?),.+?HEH/) { # take CELL number into
$1 and the information after the number (and before the first comma)
into $2
$CELL{$1}{$2}++;
$CELL_TYPE_COUNT{$2}++;
Hi Chris,
I really believe people would like to help here, but if no one can make head
of what you posted, they may as well ignore your codes and call for help all
together.
Fine you have showed, what your raw data are, but please can you show how
you want your output to look like? Because going by
On Sat, Oct 15, 2011 at 1:12 PM, Leo Susanto wrote:
> Chris, You need to let us know what do you want the script to do,
> believe me, writing the script is the easy part.
>
Okay I will try to clarify. For right now there is only one type of
line that I am interested in from the input file.
I wi
Chris, You need to let us know what do you want the script to do,
believe me, writing the script is the easy part.
>
> But really I am probably speaking gibberish until you provide some
> sample output. Especially it would be good to have other test cases --
> like what other cells would look like
On 2011.10.15.00.08, Chris Stinemetz wrote:
> I am trying to create a Perl script that will scan a file using regex
> to match certain patterns and return uniq names and the total count of
> each match.
>
> With the sample input data (on the far bottom) the return value should
> be CELL 20 in Colu
On 2011.10.15.00.08, Chris Stinemetz wrote:
> My scripts thus far:
>
> heh.pl
> #!/usr/bin/perl
>
> use warnings;
> use strict;
> requuire "heh.lib";
Couple things here -- "require" is spelled wrong. But also you have to
say "heh.lib.pl". I will let someone else suggest that you organize this
us
Not sure how to answer this, could you please give more information?
> With the sample input data (on the far bottom) the return value should
> be CELL 20 in Column 1 with 2 Counts of CDM HEH in the third column.
Is not sufficient for me.
On Fri, Oct 14, 2011 at 10:08 PM, Chris Stinemetz
wrote:
16 matches
Mail list logo