$mystring = "name:blk:house::";
print "$mystring\n";
@s_format = split(/:/, $mystring);
for ($i=0; $i <= $#s_format; $i++) {
print "index is $i,field is $s_format";
print "\n";
}
$size = $#s_format + 1;
print "total size of array is $size\n";
i am expecting my size to be 5, why is it... (5 Replies)
I'm using a PERL cgi script that uses rrdtool to make graphs. I can't get the syntax correct to use a degree sign (alt+0176 like this °) and also using a variable.
If I use single quotes, I can't call the variable. If I use double quotes, there is an extra symbol (Â) before the ° which goes... (2 Replies)
hi, I have a seemingly really stupid question, but here goes!
What do you enter into split delimiter to seperate something like this
"December 12, 1995"
and get
December
12
1995
?
thanks (5 Replies)
Hi... I have a question regarding the split function in PERL.
I have a very huge csv file (more than 80 million records). I need to extract a particular position(eg : 50th position) of each line from the csv file. I tried using split function. But I realized split takes a very long time.
Also... (0 Replies)
Hi all, I'm going bonkers trying to figure something out that is probably simple for most of you. I have a choice between getting therapy for this or coming here to ask for help. I chose the latter. :D
What I'm trying to do is perform a split on a line but only one split. For example, let's... (4 Replies)
Hi expert,
As we know in regular expression, means neither a nor b.
Now the question is how to consider <ab> as a whole part or somehow a single char. Something like which is meaning neither ( nor a nor b nor ).
Or do we have another way for this?
The real requirement is as below: ... (2 Replies)
Hi All,
How to split the string KAR_Celltick_Ban_GSMGW3 and want to pickup the third filed. Sometime the string may be "KAR_Celltick_Ban" like this
Thanks in advance (1 Reply)
I have a log with entries like:
out/target/product/imx53_smd/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/bindings/V8HTMLVideoElement.cpp
: target thumb C++: libwebcore <=... (8 Replies)
Hello, I have the following code:
while ($line = <fd_in>) {
126 $line = " " . $line ;
127 print "our_line:$line\n";
128 @list = split (/\s+/, $line) ;
129 print "after_split:@list\n";
130 print "$list\t$list\t$list\t$list\t$list\t$list$list\t\n";
131 $len =... (2 Replies)
Discussion started by: Zam_1234
2 Replies
LEARN ABOUT OSX
ppi::token::attribute
PPI::Token::Attribute(3) User Contributed Perl Documentation PPI::Token::Attribute(3)NAME
PPI::Token::Attribute - A token for a subroutine attribute
INHERITANCE
PPI::Token::Attribute
isa PPI::Token
isa PPI::Element
DESCRIPTION
In Perl, attributes are a relatively recent addition to the language.
Given the code " sub foo : bar(something) {} ", the "bar(something)" part is the attribute.
A "PPI::Token::Attribute" token represents the entire of the attribute, as the braces and its contents are not parsed into the tree, and
are treated by Perl (and thus by us) as a single string.
METHODS
This class provides some additional methods beyond those provided by its PPI::Token and PPI::Element parent classes.
Got any ideas for methods? Submit a report to rt.cpan.org!
identifier
The "identifier" attribute returns the identifier part of the attribute.
That is, for the attribute "foo(bar)", the "identifier" method would return "foo".
parameters
The "parameters" method returns the parameter strong for the attribute.
That is, for the attribute "foo(bar)", the "parameters" method would return "bar".
Returns the parameters as a string (including the null string '' for the case of an attribute such as "foo()".
Returns "undef" if the attribute does not have parameters.
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.2 2011-02-25 PPI::Token::Attribute(3)