Perl /
StringsPerl.Strings HistoryHide minor edits - Show changes to markup July 13, 2005, at 03:53 AM
by
Changed lines 14-18 from:
$s = q(Don't let yourself go); to:
$s = qq(I said: "go away"); Changed lines 21-25 from:
$s = qq(I said: "go away"); print "$s \n"; to:
July 13, 2005, at 03:52 AM
by
Changed line 6 from:
to:
July 13, 2005, at 03:52 AM
by
Changed line 1 from:
=perl [= to:
Changed line 6 from:
to:
July 13, 2005, at 02:57 AM
by
Changed line 1 from:
<code> to:
=perl [= Changed line 117 from:
</code> to:
=] July 13, 2005, at 02:49 AM
by
Added line 1:
<code> Changed lines 116-117 from:
printf "2d\n", "onuc", 13,33; to:
printf "2d\n", "onuc", 13,33; </code> July 13, 2005, at 02:49 AM
by
Added lines 1-115:
use strict; use warnings; my ($s, $s1, $s2, $s3); my (@l, @l1, @l2);
$s = q(Don't let yourself go); print "$s \n"; $s = qq(I said: "go away"); print "$s \n";
print <<EOF; Hey man i am alive EOF
$s =<<EOF2?; go go go EOF2? print "$s \n";
$s =<<'EOF'; [email protected] EOF print "$s \n";
$s =<<"EOF"; oz\@kozgun.net oz\nat\nkozgun.net EOF print "$s \n";
$s1 = "Hey man i am alive"; $s2 = substr($s1, 4, 4, "girl"); $s3 = substr($s1, -4, 4); print "$s1 - $s2 - $s3\n";
print uc($s1), "\n"; print lc($s1), "\n";
print ucfirst($s1), "\n"; print lcfirst($s1), "\n";
print "length: " , length($s1) , "\n";
$s1 = "ozx"; print "$s1 : ", chop($s1) , "\n";
$s1 = "oz\n"; print chomp($s1) , "\n"; print "$s1 \n";
$s1 = "oz ko"; $s2 = index($s1, "ko", 0); print "$s2 \n";
$s1 = "perl perl perl"; $s2 = rindex($s1, "perl"); print "$s2 \n";
@l1 = qw(red green blue); $s1 = join(",", @l1); $s2 = join(" and ", @l1); print "$s1 \n"; print "$s2 \n";
$s1 = "red,blue,green"; @l1 = split(/,/,$s1,2); #Limit 2 @l2 = split(/,/,$s1); print "@l1 \n"; print "@l2 \n";
$s1 = "win win win"; $s1 =~ tr/w/l/; print "$s1\n"; $s1 =~ tr/[a-z]/[A-Z]/; print "$s1\n"; $s1 = "ABCDEFGH"; $s1 =~ tr/ABCD/ab/d; #CD silinir. print "$s1\n"; $s1 = "peeerrllll pppppeerrrrll"; $s1 =~ tr/[a-z]/[a-z]/s; # veya tr/[a-z]//s print "$s1\n";
printf "2d\n", "onuc", 13,33; |