Guest User

Dreamclown

a guest
Dec 18th, 2010
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.34 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. $age = 26;
  4. @date = (8, 24, 70);
  5.  
  6. system("cls");
  7. my $a = "Dreamclown";
  8. print $a;
  9. print "\nhello, world\n"; #newline
  10. print "hello, world\t";     #tap
  11. print "\nhello, world\b";    #backspace
  12. print "\nhello, world\a";     #alert
  13. print "\nhello, world\e";      #ESC charecter
  14. print "\nhello, world\033";
  15. print "\nhello, world\x7f";     #DEL charecter
  16. print "\nhello, world\cC";      #CTRL-C
  17. print "\nhello, world\\";
  18. print "\nhello, world\"";     #double quote
  19. print "\nhello, worl\ud";   #upper
  20. print "\nhello, worl\lD";    #lowwer
  21. print "\n\Uhello, world";   #all upper
  22. print "\n\LHELLO, WORLD";    #all lowwer
  23. print "\n\Qhello, world";
  24. print "\n\Uhello\E, world\n";     #End \U\L\Q
  25. print $age."\n";
  26. print $date[2] . "\n";
  27.  
  28. %fruit = (
  29.           apples => 3,
  30.           oranges => 6
  31. );
  32.  
  33. ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
  34. print $hour . ":" . $min . ":" . $sec . "\n";
  35.  
  36. $now = localtime();
  37. print $now . "\n";
  38.  
  39. if ($a = "Dreamclown"){
  40.   print "OK";
  41. }
  42. else{
  43.   print "Not OK";
  44. }
  45.  
  46. unless ($a = "Dreamclown"){
  47.   print "\nA";
  48. }
  49. else{
  50.   print "\nB";
  51. }
  52.  
  53. if ($a != "Dreamclown"){ print "\nThat's right..!";}
  54. elsif ($a = "Dreamclown"){ print "\nGood\n"; }
  55.  
  56. $i = 1;
  57. while ($i < 10){
  58.   print $i . "\n";
  59. }
  60. continue{
  61.   $i++;
  62. }
  63.  
  64. for($i = 1;$i < 11;$i++){
  65.   print $i . "\n";
  66. }
Advertisement
Add Comment
Please, Sign In to add comment