$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 DEBIAN
moose::meta::role::attribute
Moose::Meta::Role::Attribute(3pm) User Contributed Perl Documentation Moose::Meta::Role::Attribute(3pm)NAME
Moose::Meta::Role::Attribute - The Moose attribute metaclass for Roles
VERSION
version 2.0603
DESCRIPTION
This class implements the API for attributes in roles. Attributes in roles are more like attribute prototypes than full blown attributes.
While they are introspectable, they have very little behavior.
METHODS
This class provides the following methods:
Moose::Meta::Role::Attribute->new(...)
This method accepts all the options that would be passed to the constructor for Moose::Meta::Attribute.
$attr->metaclass
$attr->is
Returns the option as passed to the constructor.
$attr->associated_role
Returns the Moose::Meta::Role to which this attribute belongs, if any.
$attr->original_role
Returns the Moose::Meta::Role in which this attribute was first defined. This may not be the same as the value "associated_role()" in
the case of composite role, or the case where one role consumes other roles.
$attr->original_options
Returns a hash reference of options passed to the constructor. This is used when creating a Moose::Meta::Attribute object from this
object.
$attr->attach_to_role($role)
Attaches the attribute to the given Moose::Meta::Role.
$attr->attribute_for_class($metaclass)
Given an attribute metaclass name, this method calls "$metaclass->interpolate_class_and_new" to construct an attribute object which can
be added to a Moose::Meta::Class.
$attr->clone
Creates a new object identical to the object on which the method is called.
$attr->is_same_as($other_attr)
Compares two role attributes and returns true if they are identical.
In addition, this class implements all informational predicates implements by Moose::Meta::Attribute (and Class::MOP::Attribute).
BUGS
See "BUGS" in Moose for details on reporting bugs.
AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See "CABAL" in Moose and "CONTRIBUTORS" in Moose for
details.
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-28 Moose::Meta::Role::Attribute(3pm)