P e r l d o c B r o w s e r
●
5 . 0 0 5 _ 0 3
L a t e s t
5 . 4 0 . 0
5 . 3 8 . 2
5 . 3 8 . 1
5 . 3 8 . 0
5 . 3 6 . 3
5 . 3 6 . 2
5 . 3 6 . 1
5 . 3 6 . 0
5 . 3 4 . 3
5 . 3 4 . 2
5 . 3 4 . 1
5 . 3 4 . 0
5 . 3 2 . 1
5 . 3 2 . 0
5 . 3 0 . 3
5 . 3 0 . 2
5 . 3 0 . 1
5 . 3 0 . 0
5 . 2 8 . 3
5 . 2 8 . 2
5 . 2 8 . 1
5 . 2 8 . 0
5 . 2 6 . 3
5 . 2 6 . 2
5 . 2 6 . 1
5 . 2 6 . 0
5 . 2 4 . 4
5 . 2 4 . 3
5 . 2 4 . 2
5 . 2 4 . 1
5 . 2 4 . 0
5 . 2 2 . 4
5 . 2 2 . 3
5 . 2 2 . 2
5 . 2 2 . 1
5 . 2 2 . 0
5 . 2 0 . 3
5 . 2 0 . 2
5 . 2 0 . 1
5 . 2 0 . 0
5 . 1 8 . 4
5 . 1 8 . 3
5 . 1 8 . 2
5 . 1 8 . 1
5 . 1 8 . 0
5 . 1 6 . 3
5 . 1 6 . 2
5 . 1 6 . 1
5 . 1 6 . 0
5 . 1 4 . 4
5 . 1 4 . 3
5 . 1 4 . 2
5 . 1 4 . 1
5 . 1 4 . 0
5 . 1 2 . 5
5 . 1 2 . 4
5 . 1 2 . 3
5 . 1 2 . 2
5 . 1 2 . 1
5 . 1 2 . 0
5 . 1 0 . 1
5 . 1 0 . 0
5 . 8 . 9
5 . 8 . 8
5 . 8 . 7
5 . 8 . 6
5 . 8 . 5
5 . 8 . 4
5 . 8 . 3
5 . 8 . 2
5 . 8 . 1
5 . 8 . 0
5 . 6 . 2
5 . 6 . 1
5 . 6 . 0
5 . 0 0 5 _ 0 4
5 . 0 0 5 _ 0 3
5 . 0 0 5 _ 0 2
5 . 0 0 5 _ 0 1
5 . 0 0 5
●
D e v
b l e a d
5 . 4 1 . 2
5 . 4 1 . 1
5 . 4 0 . 0 - R C 2
5 . 4 0 . 0 - R C 1
5 . 3 9 . 1 0
5 . 3 9 . 9
5 . 3 9 . 8
5 . 3 9 . 6
5 . 3 9 . 5
5 . 3 9 . 4
5 . 3 9 . 3
5 . 3 9 . 2
5 . 3 9 . 1
5 . 3 7 . 1 1
5 . 3 7 . 1 0
5 . 3 7 . 9
5 . 3 7 . 8
5 . 3 7 . 7
5 . 3 7 . 6
5 . 3 7 . 5
5 . 3 7 . 4
5 . 3 7 . 3
5 . 3 7 . 2
5 . 3 7 . 1
5 . 3 7 . 0
●
D o c u m e n t a t i o n
P e r l
I n t r o
T u t o r i a l s
F A Q s
R e f e r e n c e
O p e r a t o r s
F u n c t i o n s
V a r i a b l e s
M o d u l e s
U t i l i t i e s
C o m m u n i t y
H i s t o r y
E x p a n d
p e r l
( s o u r c e ,
C P A N )
Y o u a r e v i e w i n g t h e v e r s i o n o f t h i s d o c u m e n t a t i o n f r o m P e r l 5 . 0 0 5 _ 0 3 .
V i e w t h e l a t e s t v e r s i o n
●
N A M E
●
S Y N O P S I S
●
D E S C R I P T I O N
●
A V A I L A B I L I T Y
●
E N V I R O N M E N T
●
A U T H O R
●
F I L E S
●
S E E A L S O
●
D I A G N O S T I C S
●
B U G S
●
N O T E S
# N A M E
p e r l - P r a c t i c a l E x t r a c t i o n a n d R e p o r t L a n g u a g e
# S Y N O P S I S
p e r l [ - s T u U ] [ - h v ] [ - V [ : c o n f i g v a r ] ] [ - c w ] [ - d [ : d e b u g g e r ] ] [ - D [ n u m b e r / l i s t ] ] [ - p n a ] [ - F p a t t e r n ] [ - l [ o c t a l ] ] [ - 0 [ o c t a l ] ] [ - I d i r ] [ - m [ - ] m o d u l e ] [ - M [ - ] ' m o d u l e . . . ' ] [ - P ] [ - S ] [ - x [ d i r ] ] [ - i [ e x t e n s i o n ] ] [ - e ' c o m m a n d ' ] [ - - ] [ p r o g r a m f i l e ] [ a r g u m e n t ] . . .
F o r e a s e o f a c c e s s , t h e P e r l m a n u a l h a s b e e n s p l i t u p i n t o a n u m b e r o f s e c t i o n s :
perl Perl overview (this section)
perldelta Perl changes since previous version
perl5004delta Perl changes in version 5.004
perlfaq Perl frequently asked questions
perltoc Perl documentation table of contents
perldata Perl data structures
perlsyn Perl syntax
perlop Perl operators and precedence
perlre Perl regular expressions
perlrun Perl execution and options
perlfunc Perl builtin functions
perlopentut Perl open() tutorial
perlvar Perl predefined variables
perlsub Perl subroutines
perlmod Perl modules: how they work
perlmodlib Perl modules: how to write and use
perlmodinstall Perl modules: how to install from CPAN
perlform Perl formats
perllocale Perl locale support
perlref Perl references
perlreftut Perl references short introduction
perldsc Perl data structures intro
perllol Perl data structures: lists of lists
perltoot Perl OO tutorial
perlobj Perl objects
perltie Perl objects hidden behind simple variables
perlbot Perl OO tricks and examples
perlipc Perl interprocess communication
perlthrtut Perl threads tutorial
perldebug Perl debugging
perldiag Perl diagnostic messages
perlsec Perl security
perltrap Perl traps for the unwary
perlport Perl portability guide
perlstyle Perl style guide
perlpod Perl plain old documentation
perlbook Perl book information
perlembed Perl ways to embed perl in your C or C++ application
perlapio Perl internal IO abstraction interface
perlxs Perl XS application programming interface
perlxstut Perl XS tutorial
perlguts Perl internal functions for those doing extensions
perlcall Perl calling conventions from C
perlhist Perl history records
( I f y o u ' r e i n t e n d i n g t o r e a d t h e s e s t r a i g h t t h r o u g h f o r t h e f i r s t t i m e , t h e s u g g e s t e d o r d e r w i l l t e n d t o r e d u c e t h e n u m b e r o f f o r w a r d r e f e r e n c e s . )
B y d e f a u l t , a l l o f t h e a b o v e m a n p a g e s a r e i n s t a l l e d i n t h e / u s r / l o c a l / m a n / d i r e c t o r y .
E x t e n s i v e a d d i t i o n a l d o c u m e n t a t i o n f o r P e r l m o d u l e s i s a v a i l a b l e . T h e d e f a u l t c o n f i g u r a t i o n f o r p e r l w i l l p l a c e t h i s a d d i t i o n a l d o c u m e n t a t i o n i n t h e / u s r / l o c a l / l i b / p e r l 5 / m a n d i r e c t o r y ( o r e l s e i n t h e m a n s u b d i r e c t o r y o f t h e P e r l l i b r a r y d i r e c t o r y ) . S o m e o f t h i s a d d i t i o n a l d o c u m e n t a t i o n i s d i s t r i b u t e d s t a n d a r d w i t h P e r l , b u t y o u ' l l a l s o f i n d d o c u m e n t a t i o n f o r t h i r d - p a r t y m o d u l e s t h e r e .
Y o u s h o u l d b e a b l e t o v i e w P e r l ' s d o c u m e n t a t i o n w i t h y o u r m a n ( 1 ) p r o g r a m b y i n c l u d i n g t h e p r o p e r d i r e c t o r i e s i n t h e a p p r o p r i a t e s t a r t - u p f i l e s , o r i n t h e M A N P A T H e n v i r o n m e n t v a r i a b l e . T o f i n d o u t w h e r e t h e c o n f i g u r a t i o n h a s i n s t a l l e d t h e m a n p a g e s , t y p e :
perl -V:man.dir
I f t h e d i r e c t o r i e s h a v e a c o m m o n s t e m , s u c h a s / u s r / l o c a l / m a n / m a n 1 a n d / u s r / l o c a l / m a n / m a n 3 , y o u n e e d o n l y t o a d d t h a t s t e m ( / u s r / l o c a l / m a n ) t o y o u r m a n ( 1 ) c o n f i g u r a t i o n f i l e s o r y o u r M A N P A T H e n v i r o n m e n t v a r i a b l e . I f t h e y d o n o t s h a r e a s t e m , y o u ' l l h a v e t o a d d b o t h s t e m s .
I f t h a t d o e s n ' t w o r k f o r s o m e r e a s o n , y o u c a n s t i l l u s e t h e s u p p l i e d p e r l d o c s c r i p t t o v i e w m o d u l e i n f o r m a t i o n . Y o u m i g h t a l s o l o o k i n t o g e t t i n g a r e p l a c e m e n t m a n p r o g r a m .
I f s o m e t h i n g s t r a n g e h a s g o n e w r o n g w i t h y o u r p r o g r a m a n d y o u ' r e n o t s u r e w h e r e y o u s h o u l d l o o k f o r h e l p , t r y t h e - w s w i t c h f i r s t . I t w i l l o f t e n p o i n t o u t e x a c t l y w h e r e t h e t r o u b l e i s .
# D E S C R I P T I O N
P e r l i s a l a n g u a g e o p t i m i z e d f o r s c a n n i n g a r b i t r a r y t e x t f i l e s , e x t r a c t i n g i n f o r m a t i o n f r o m t h o s e t e x t f i l e s , a n d p r i n t i n g r e p o r t s b a s e d o n t h a t i n f o r m a t i o n . I t ' s a l s o a g o o d l a n g u a g e f o r m a n y s y s t e m m a n a g e m e n t t a s k s . T h e l a n g u a g e i s i n t e n d e d t o b e p r a c t i c a l ( e a s y t o u s e , e f f i c i e n t , c o m p l e t e ) r a t h e r t h a n b e a u t i f u l ( t i n y , e l e g a n t , m i n i m a l ) .
P e r l c o m b i n e s ( i n t h e a u t h o r ' s o p i n i o n , a n y w a y ) s o m e o f t h e b e s t f e a t u r e s o f C , s e d , a w k , a n d sh , s o p e o p l e f a m i l i a r w i t h t h o s e l a n g u a g e s s h o u l d h a v e l i t t l e d i f f i c u l t y w i t h i t . ( L a n g u a g e h i s t o r i a n s w i l l a l s o n o t e s o m e v e s t i g e s o f c s h , P a s c a l , a n d e v e n B A S I C - P L U S . ) E x p r e s s i o n s y n t a x c o r r e s p o n d s q u i t e c l o s e l y t o C e x p r e s s i o n s y n t a x . U n l i k e m o s t U n i x u t i l i t i e s , P e r l d o e s n o t a r b i t r a r i l y l i m i t t h e s i z e o f y o u r d a t a - - i f y o u ' v e g o t t h e m e m o r y , P e r l c a n s l u r p i n y o u r w h o l e f i l e a s a s i n g l e s t r i n g . R e c u r s i o n i s o f u n l i m i t e d d e p t h . A n d t h e t a b l e s u s e d b y h a s h e s ( s o m e t i m e s c a l l e d " a s s o c i a t i v e a r r a y s " ) g r o w a s n e c e s s a r y t o p r e v e n t d e g r a d e d p e r f o r m a n c e . P e r l c a n u s e s o p h i s t i c a t e d p a t t e r n m a t c h i n g t e c h n i q u e s t o s c a n l a r g e a m o u n t s o f d a t a v e r y q u i c k l y . A l t h o u g h o p t i m i z e d f o r s c a n n i n g t e x t , P e r l c a n a l s o d e a l w i t h b i n a r y d a t a , a n d c a n m a k e d b m f i l e s l o o k l i k e h a s h e s . S e t u i d P e r l s c r i p t s a r e s a f e r t h a n C p r o g r a m s t h r o u g h a d a t a f l o w t r a c i n g m e c h a n i s m w h i c h p r e v e n t s m a n y s t u p i d s e c u r i t y h o l e s .
I f y o u h a v e a p r o b l e m t h a t w o u l d o r d i n a r i l y u s e s e d or a w k or sh , b u t i t e x c e e d s t h e i r c a p a b i l i t i e s o r m u s t r u n a l i t t l e f a s t e r , a n d y o u d o n ' t w a n t t o w r i t e t h e s i l l y t h i n g i n C , t h e n P e r l m a y b e f o r y o u . T h e r e a r e a l s o t r a n s l a t o r s t o t u r n y o u r s e d a n d a w k s c r i p t s i n t o P e r l s c r i p t s .
B u t w a i t , t h e r e ' s m o r e . . .
P e r l v e r s i o n 5 i s n e a r l y a c o m p l e t e r e w r i t e , a n d p r o v i d e s t h e f o l l o w i n g a d d i t i o n a l b e n e f i t s :
M a n y u s a b i l i t y e n h a n c e m e n t s
I t i s n o w p o s s i b l e t o w r i t e m u c h m o r e r e a d a b l e P e r l c o d e ( e v e n w i t h i n r e g u l a r e x p r e s s i o n s ) . F o r m e r l y c r y p t i c v a r i a b l e n a m e s c a n b e r e p l a c e d b y m n e m o n i c i d e n t i f i e r s . E r r o r m e s s a g e s a r e m o r e i n f o r m a t i v e , a n d t h e o p t i o n a l w a r n i n g s w i l l c a t c h m a n y o f t h e m i s t a k e s a n o v i c e m i g h t m a k e . T h i s c a n n o t b e s t r e s s e d e n o u g h . W h e n e v e r y o u g e t m y s t e r i o u s b e h a v i o r , t r y t h e - w s w i t c h !!! W h e n e v e r y o u d o n ' t g e t m y s t e r i o u s b e h a v i o r , t r y u s i n g - w a n y w a y .
S i m p l i f i e d g r a m m a r
T h e n e w y a c c g r a m m a r i s o n e h a l f t h e s i z e o f t h e o l d o n e . M a n y o f t h e a r b i t r a r y g r a m m a r r u l e s h a v e b e e n r e g u l a r i z e d . T h e n u m b e r o f r e s e r v e d w o r d s h a s b e e n c u t b y 2 / 3 . D e s p i t e t h i s , n e a r l y a l l o l d P e r l s c r i p t s w i l l c o n t i n u e t o w o r k u n c h a n g e d .
L e x i c a l s c o p i n g
P e r l v a r i a b l e s m a y n o w b e d e c l a r e d w i t h i n a l e x i c a l s c o p e , l i k e " a u t o " v a r i a b l e s i n C . N o t o n l y i s t h i s m o r e e f f i c i e n t , b u t i t c o n t r i b u t e s t o b e t t e r p r i v a c y f o r " p r o g r a m m i n g i n t h e l a r g e " . A n o n y m o u s s u b r o u t i n e s e x h i b i t d e e p b i n d i n g o f l e x i c a l v a r i a b l e s ( c l o s u r e s ) .
A r b i t r a r i l y n e s t e d d a t a s t r u c t u r e s
A n y s c a l a r v a l u e , i n c l u d i n g a n y a r r a y e l e m e n t , m a y n o w c o n t a i n a r e f e r e n c e t o a n y o t h e r v a r i a b l e o r s u b r o u t i n e . Y o u c a n e a s i l y c r e a t e a n o n y m o u s v a r i a b l e s a n d s u b r o u t i n e s . P e r l m a n a g e s y o u r r e f e r e n c e c o u n t s f o r y o u .
M o d u l a r i t y a n d r e u s a b i l i t y
T h e P e r l l i b r a r y i s n o w d e f i n e d i n t e r m s o f m o d u l e s w h i c h c a n b e e a s i l y s h a r e d a m o n g v a r i o u s p a c k a g e s . A p a c k a g e m a y c h o o s e t o i m p o r t a l l o r a p o r t i o n o f a m o d u l e ' s p u b l i s h e d i n t e r f a c e . P r a g m a s ( t h a t i s , c o m p i l e r d i r e c t i v e s ) a r e d e f i n e d a n d u s e d b y t h e s a m e m e c h a n i s m .
O b j e c t - o r i e n t e d p r o g r a m m i n g
A p a c k a g e c a n f u n c t i o n a s a c l a s s . D y n a m i c m u l t i p l e i n h e r i t a n c e a n d v i r t u a l m e t h o d s a r e s u p p o r t e d i n a s t r a i g h t f o r w a r d m a n n e r a n d w i t h v e r y l i t t l e n e w s y n t a x . F i l e h a n d l e s m a y n o w b e t r e a t e d a s o b j e c t s .
E m b e d d a b l e a n d E x t e n s i b l e
P e r l m a y n o w b e e m b e d d e d e a s i l y i n y o u r C o r C + + a p p l i c a t i o n , a n d c a n e i t h e r c a l l o r b e c a l l e d b y y o u r r o u t i n e s t h r o u g h a d o c u m e n t e d i n t e r f a c e . T h e X S p r e p r o c e s s o r i s p r o v i d e d t o m a k e i t e a s y t o g l u e y o u r C o r C + + r o u t i n e s i n t o P e r l . D y n a m i c l o a d i n g o f m o d u l e s i s s u p p o r t e d , a n d P e r l i t s e l f c a n b e m a d e i n t o a d y n a m i c l i b r a r y .
P O S I X c o m p l i a n t
A m a j o r n e w m o d u l e i s t h e P O S I X m o d u l e , w h i c h p r o v i d e s a c c e s s t o a l l a v a i l a b l e P O S I X r o u t i n e s a n d d e f i n i t i o n s , v i a o b j e c t c l a s s e s w h e r e a p p r o p r i a t e .
P a c k a g e c o n s t r u c t o r s a n d d e s t r u c t o r s
T h e n e w B E G I N a n d E N D b l o c k s p r o v i d e m e a n s t o c a p t u r e c o n t r o l a s a p a c k a g e i s b e i n g c o m p i l e d , a n d a f t e r t h e p r o g r a m e x i t s . A s a d e g e n e r a t e c a s e t h e y w o r k j u s t l i k e a w k ' s B E G I N a n d E N D w h e n y o u u s e t h e - p or - n s w i t c h e s .
M u l t i p l e s i m u l t a n e o u s D B M i m p l e m e n t a t i o n s
A P e r l p r o g r a m m a y n o w a c c e s s D B M , N D B M , S D B M , G D B M , a n d B e r k e l e y D B f i l e s f r o m t h e s a m e s c r i p t s i m u l t a n e o u s l y . I n f a c t , t h e o l d d b m o p e n i n t e r f a c e h a s b e e n g e n e r a l i z e d t o a l l o w a n y v a r i a b l e t o b e t i e d t o a n o b j e c t c l a s s w h i c h d e f i n e s i t s a c c e s s m e t h o d s .
S u b r o u t i n e d e f i n i t i o n s m a y n o w b e a u t o l o a d e d
I n f a c t , t h e A U T O L O A D m e c h a n i s m a l s o a l l o w s y o u t o d e f i n e a n y a r b i t r a r y s e m a n t i c s f o r u n d e f i n e d s u b r o u t i n e c a l l s . I t ' s n o t f o r j u s t a u t o l o a d i n g .
R e g u l a r e x p r e s s i o n e n h a n c e m e n t s
Y o u c a n n o w s p e c i f y n o n g r e e d y q u a n t i f i e r s . Y o u c a n n o w d o g r o u p i n g w i t h o u t c r e a t i n g a b a c k r e f e r e n c e . Y o u c a n n o w w r i t e r e g u l a r e x p r e s s i o n s w i t h e m b e d d e d w h i t e s p a c e a n d c o m m e n t s f o r r e a d a b i l i t y . A c o n s i s t e n t e x t e n s i b i l i t y m e c h a n i s m h a s b e e n a d d e d t h a t i s u p w a r d l y c o m p a t i b l e w i t h a l l o l d r e g u l a r e x p r e s s i o n s .
I n n u m e r a b l e U n b u n d l e d M o d u l e s
T h e C o m p r e h e n s i v e P e r l A r c h i v e N e t w o r k d e s c r i b e d i n p e r l m o d l i b c o n t a i n s h u n d r e d s o f p l u g - a n d - p l a y m o d u l e s f u l l o f r e u s a b l e c o d e . S e e h t t p : / / w w w . p e r l . c o m / C P A N f o r a s i t e n e a r y o u .
C o m p i l a b i l i t y
W h i l e n o t y e t i n f u l l p r o d u c t i o n m o d e , a w o r k i n g p e r l - t o - C c o m p i l e r d o e s e x i s t . I t c a n g e n e r a t e p o r t a b l e b y t e c o d e , s i m p l e C , o r o p t i m i z e d C c o d e .
O k a y , t h a t ' s d e f i n i t e l y e n o u g h h y p e .
# A V A I L A B I L I T Y
P e r l i s a v a i l a b l e f o r t h e v a s t m a j o r i t y o f o p e r a t i n g s y s t e m p l a t f o r m s , i n c l u d i n g m o s t U n i x - l i k e p l a t f o r m s . T h e f o l l o w i n g s i t u a t i o n i s a s o f F e b r u a r y 1 9 9 9 a n d P e r l 5 . 0 0 5 _ 0 3 .
T h e f o l l o w i n g p l a t f o r m s a r e a b l e t o b u i l d P e r l f r o m t h e s t a n d a r d s o u r c e c o d e d i s t r i b u t i o n a v a i l a b l e a t h t t p : / / w w w . p e r l . c o m / C P A N / s r c / i n d e x . h t m l
AIX Linux SCO ODT/OSR
A/UX MachTen Solaris
BeOS MPE/iX SunOS
BSD/OS NetBSD SVR4
DG/UX NextSTEP Tru64 UNIX 3)
DomainOS OpenBSD Ultrix
DOS DJGPP 1) OpenSTEP UNICOS
DYNIX/ptx OS/2 VMS
FreeBSD OS390 2) VOS
HP-UX PowerMAX Windows 3.1 1)
Hurd QNX Windows 95 1) 4)
IRIX Windows 98 1) 4)
Windows NT 1) 4)
1) in DOS mode either the DOS or OS/2 ports can be used
2) formerly known as MVS
3) formerly known as Digital UNIX and before that DEC OSF/1
4) compilers: Borland, Cygwin32, Mingw32 EGCS/GCC, VC++
T h e f o l l o w i n g p l a t f o r m s h a v e b e e n k n o w n t o b u i l d P e r l f r o m t h e s o u r c e b u t f o r t h e P e r l r e l e a s e 5 . 0 0 5 _ 0 3 w e h a v e n ' t b e e n a b l e t o v e r i f y t h e m , e i t h e r b e c a u s e t h e h a r d w a r e / s o f t w a r e p l a t f o r m s a r e r a t h e r r a r e o r b e c a u s e w e d o n ' t h a v e a n a c t i v e c h a m p i o n o n t h e s e p l a t f o r m s , o r b o t h .
3b1 FPS Plan 9
AmigaOS GENIX PowerUX
ConvexOS Greenhills RISC/os
CX/UX ISC Stellar
DC/OSx MachTen 68k SVR2
DDE SMES MiNT TI1500
DOS EMX MPC TitanOS
Dynix NEWS-OS UNICOS/mk
EP/IX Opus Unisys Dynix
ESIX Unixware
T h e f o l l o w i n g p l a t f o r m s a r e p l a n n e d t o b e s u p p o r t e d i n t h e s t a n d a r d s o u r c e c o d e d i s t r i b u t i o n o f t h e P e r l r e l e a s e 5 . 0 0 6 b u t a r e n o t s u p p o r t e d i n t h e P e r l r e l e a s e 5 . 0 0 5 _ 0 3 :
BS2000
Netware
Rhapsody
VM/ESA
T h e f o l l o w i n g p l a t f o r m s h a v e t h e i r o w n s o u r c e c o d e d i s t r i b u t i o n s a n d b i n a r i e s a v a i l a b l e v i a h t t p : / / w w w . p e r l . c o m / C P A N / p o r t s / i n d e x . h t m l .
Perl release
AS/400 5.003
MacOS 5.004
Netware 5.003_07
Tandem Guardian 5.004
T h e f o l l o w i n g p l a t f o r m s h a v e o n l y b i n a r i e s a v a i l a b l e v i a h t t p : / / w w w . p e r l . c o m / C P A N / p o r t s / i n d e x . h t m l .
Perl release
Acorn RISCOS 5.005_02
AOS 5.002
LynxOS 5.004_02
# E N V I R O N M E N T
S e e p e r l r u n .
# A U T H O R
L a r r y W a l l < l a r r y @ w a l l . o r g > , w i t h t h e h e l p o f o o d l e s o f o t h e r f o l k s .
I f y o u r P e r l s u c c e s s s t o r i e s a n d t e s t i m o n i a l s m a y b e o f h e l p t o o t h e r s w h o w i s h t o a d v o c a t e t h e u s e o f P e r l i n t h e i r a p p l i c a t i o n s , o r i f y o u w i s h t o s i m p l y e x p r e s s y o u r g r a t i t u d e t o L a r r y a n d t h e P e r l d e v e l o p e r s , p l e a s e w r i t e t o < p e r l - t h a n k s @ p e r l . o r g > .
# F I L E S
"@INC" locations of perl libraries
# S E E A L S O
a2p awk to perl translator
s2p sed to perl translator
# D I A G N O S T I C S
T h e - w s w i t c h p r o d u c e s s o m e l o v e l y d i a g n o s t i c s .
S e e p e r l d i a g f o r e x p l a n a t i o n s o f a l l P e r l ' s d i a g n o s t i c s . T h e u s e
d i a g n o s t i c s
p r a g m a a u t o m a t i c a l l y t u r n s P e r l ' s n o r m a l l y t e r s e w a r n i n g s a n d e r r o r s i n t o t h e s e l o n g e r f o r m s .
C o m p i l a t i o n e r r o r s w i l l t e l l y o u t h e l i n e n u m b e r o f t h e e r r o r , w i t h a n i n d i c a t i o n o f t h e n e x t t o k e n o r t o k e n t y p e t h a t w a s t o b e e x a m i n e d . ( I n t h e c a s e o f a s c r i p t p a s s e d t o P e r l v i a - e s w i t c h e s , e a c h - e i s c o u n t e d a s o n e l i n e . )
S e t u i d s c r i p t s h a v e a d d i t i o n a l c o n s t r a i n t s t h a t c a n p r o d u c e e r r o r m e s s a g e s s u c h a s " I n s e c u r e d e p e n d e n c y " . S e e p e r l s e c .
D i d w e m e n t i o n t h a t y o u s h o u l d d e f i n i t e l y c o n s i d e r u s i n g t h e - w s w i t c h ?
# B U G S
T h e - w s w i t c h i s n o t m a n d a t o r y .
P e r l i s a t t h e m e r c y o f y o u r m a c h i n e ' s d e f i n i t i o n s o f v a r i o u s o p e r a t i o n s s u c h a s t y p e c a s t i n g , a t o f ( ) , a n d f l o a t i n g - p o i n t o u t p u t w i t h s p r i n t f ( ) .
I f y o u r s t d i o r e q u i r e s a s e e k o r e o f b e t w e e n r e a d s a n d w r i t e s o n a p a r t i c u l a r s t r e a m , s o d o e s P e r l . ( T h i s d o e s n ' t a p p l y t o s y s r e a d ( ) a n d s y s w r i t e ( ) . )
W h i l e n o n e o f t h e b u i l t - i n d a t a t y p e s h a v e a n y a r b i t r a r y s i z e l i m i t s ( a p a r t f r o m m e m o r y s i z e ) , t h e r e a r e s t i l l a f e w a r b i t r a r y l i m i t s : a g i v e n v a r i a b l e n a m e m a y n o t b e l o n g e r t h a n 2 5 1 c h a r a c t e r s . L i n e n u m b e r s d i s p l a y e d b y d i a g n o s t i c s a r e i n t e r n a l l y s t o r e d a s s h o r t i n t e g e r s , s o t h e y a r e l i m i t e d t o a m a x i m u m o f 6 5 5 3 5 ( h i g h e r n u m b e r s u s u a l l y b e i n g a f f e c t e d b y w r a p a r o u n d ) .
Y o u m a y m a i l y o u r b u g r e p o r t s ( b e s u r e t o i n c l u d e f u l l c o n f i g u r a t i o n i n f o r m a t i o n a s o u t p u t b y t h e m y c o n f i g p r o g r a m i n t h e p e r l s o u r c e t r e e , o r b y p e r l - V
) t o < p e r l b u g @ p e r l . c o m > . I f y o u ' v e s u c c e e d e d i n c o m p i l i n g p e r l , t h e p e r l b u g s c r i p t i n t h e u t i l s / s u b d i r e c t o r y c a n b e u s e d t o h e l p m a i l i n a b u g r e p o r t .
P e r l a c t u a l l y s t a n d s f o r P a t h o l o g i c a l l y E c l e c t i c R u b b i s h L i s t e r , b u t d o n ' t t e l l a n y o n e I s a i d t h a t .
# N O T E S
T h e P e r l m o t t o i s " T h e r e ' s m o r e t h a n o n e w a y t o d o i t . " D i v i n i n g h o w m a n y m o r e i s l e f t a s a n e x e r c i s e t o t h e r e a d e r .
T h e t h r e e p r i n c i p a l v i r t u e s o f a p r o g r a m m e r a r e L a z i n e s s , I m p a t i e n c e , a n d H u b r i s . S e e t h e C a m e l B o o k f o r w h y .
P e r l d o c B r o w s e r i s m a i n t a i n e d b y D a n B o o k ( D B O O K ) . P l e a s e c o n t a c t h i m v i a t h e G i t H u b i s s u e t r a c k e r or e m a i l r e g a r d i n g a n y i s s u e s w i t h t h e s i t e i t s e l f , s e a r c h , o r r e n d e r i n g o f d o c u m e n t a t i o n .
T h e P e r l d o c u m e n t a t i o n i s m a i n t a i n e d b y t h e P e r l 5 P o r t e r s i n t h e d e v e l o p m e n t o f P e r l . P l e a s e c o n t a c t t h e m v i a t h e P e r l i s s u e t r a c k e r , t h e m a i l i n g l i s t , o r I R C t o r e p o r t a n y i s s u e s w i t h t h e c o n t e n t s o r f o r m a t o f t h e d o c u m e n t a t i o n .