Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

solutions

  • Loading branch information...
commit 811b92e27dc9003d0ca133099fb60f547db373bc 1 parent c77036a
@ynonp authored
Showing with 36 additions and 0 deletions.
  1. +36 −0 sol/redbook/ex1_2.pl
View
36 sol/redbook/ex1_2.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+#===============================================================================
+#
+# FILE: ex1_2.pl
+#
+# USAGE: ./ex1_2.pl
+#
+# DESCRIPTION: Read a string and a number n.
+# Print the string n times
+#
+# AUTHOR: Ynon Perek (), ynonperek@gmail.com
+# COMPANY:
+# VERSION: 1.0
+# CREATED: 11/13/2011 11:20:08
+# REVISION: ---
+#===============================================================================
+
+use strict;
+use warnings;
+
+print "Type in the string\n";
+my $str = <>;
+
+print "Type in the number\n";
+my $count = <>;
+
+print $str x $count;
+
+for (1..$count) {
+ print $str;
+}
+
+
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.