> And buggy, consider:
my @timings = ( 11, 22, 3, 14, 18, 45, 18, ... 86 );
Yeah, it's a constraint without a cause. Do you want to treat every "18" in the
"if " or only the first? Why not use a counter? Is the data from a list, a
file or … ? Do we know it's the 5th element ahead of time?
B
Something like this:
while(){
if(/d/){
print;
say $.;
}
}
__DATA__
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Cheers,
Jing
On 9 Aug 2013, at 01:05, Unknown User wrote:
>
> Hello,
>
>
> If i am iterating through the elements in an array, at any point is it
>
Or maybe you can convert your list into a file, and use the line number
variable to do what you want.
Cheers,
Jing
On 9 Aug 2013, at 01:05, Unknown User wrote:
>
> Hello,
>
>
> If i am iterating through the elements in an array, at any point is it
> possible to say which element i am handli
On 08/08/2013 18:18, David Precious wrote:
On Thu, 8 Aug 2013 22:42:01 +0530
Unknown User wrote:
What would be the best module available for parsing html in your
opinion? My intention is to parse html that contains a table of 5
columns and any number of rows
For parsing HTML tables, you want
On Thu, Aug 8, 2013 at 10:18 AM, David Precious wrote:
> On Thu, 8 Aug 2013 22:42:01 +0530
> Unknown User wrote:
>
> > What would be the best module available for parsing html in your
> > opinion? My intention is to parse html that contains a table of 5
> > columns and any number of rows
>
> For
On 8 Aug 2013 18:19, "Unknown User" wrote:
>
>
> What would be the best module available for parsing html in your opinion?
I would also say look at HTML::TreeBuilder
> My intention is to parse html that contains a table of 5 columns and any
number of rows, and have a hash ref like
> $html->{1}->
On Thu, Aug 8, 2013 at 2:05 PM, Unknown User wrote:
>
> Hello,
>
>
> If i am iterating through the elements in an array, at any point is it
> possible to say which element i am handling without using a counter? Are
> there any builtins that i can use for it?
>
> ie
> foreach my $element (a..z) {
>
On Thu, Aug 8, 2013 at 12:05 PM, Unknown User wrote:
> at any point is it possible to say which element i am handling without
> using a counter?
Er, well, if it were an array rather than a list
my @letters = (a .. z);
foreach my $letter ( a .. z ) {
if ( $letter eq $letters[4] ) {
but that's
Have a look at HTML::PARSER.
On Aug 8, 2013 10:50 PM, "Unknown User" wrote:
>
> What would be the best module available for parsing html in your opinion?
> My intention is to parse html that contains a table of 5 columns and any
> number of rows, and have a hash ref like
> $html->{1}->{col1}=data
On Thu, 8 Aug 2013 22:42:01 +0530
Unknown User wrote:
> What would be the best module available for parsing html in your
> opinion? My intention is to parse html that contains a table of 5
> columns and any number of rows
For parsing HTML tables, you want HTML::TableExtract, IMO.
https://metacp
What would be the best module available for parsing html in your opinion?
My intention is to parse html that contains a table of 5 columns and any
number of rows, and have a hash ref like
$html->{1}->{col1}=data11, $html->{1}->{col2}=data12 ...
$html->{2}->{col1}=data21, $html->{2}->{col2}=data22
.
my $counter = 0;
foreach my $e ( a .. z ) {
$counter++;
if ( $counter == 5 ) {
}
}
On Thu, Aug 8, 2013 at 12:11 PM, jbiskofski wrote:
> my $counter = 0;
> foreach my $e ( a .. z ) {
> $counter++;
>
>
>
> On Thu, Aug 8, 2013 at 12:05 PM, Unknown User
> wr
my $counter = 0;
foreach my $e ( a .. z ) {
$counter++;
On Thu, Aug 8, 2013 at 12:05 PM, Unknown User wrote:
>
> Hello,
>
>
> If i am iterating through the elements in an array, at any point is it
> possible to say which element i am handling without using a counter? Are
> there any built
Hello,
If i am iterating through the elements in an array, at any point is it
possible to say which element i am handling without using a counter? Are
there any builtins that i can use for it?
ie
foreach my $element (a..z) {
...
if ( i am the 5th element ) { handle me special }
}
Thanks,
14 matches
Mail list logo