On 11-01-12 11:27 PM, Sunita Rani Pradhan wrote:
I have a string as; $str = "the cat sat on the mat" .How the following command works substr($str , 4, -4) on the string ? What should be the output?
TITS (Try It To See) perl -le '$str = "the cat sat on the mat";print substr( $str, 4, -4 )' -- Just my 0.00000002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it is about coding. The secret to great software: Fail early & often. Eliminate software piracy: use only FLOSS. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
