-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.txt
72 lines (65 loc) · 1.6 KB
/
output.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
MacBook-Pro:perl hbirdi$ perl q1_histogram.pl "Mississippi borders Tennessee."
s : #######
e : #####
i : ####
r : ##
n : ##
p : ##
: ##
. : #
T : #
d : #
o : #
M : #
b : #
MacBook-Pro:perl hbirdi$ perl q2_names.pl
6 Miller, Thomas
6 Garcia, William
5 Davis, Elizabeth
5 O'Day, James
2 Li, Mary
MacBook-Pro:perl hbirdi$ perl q3_balanced.pl
String '({[]})|' is NOT balanced.
String '({[]})' is balanced.
String '[]{}' is balanced.
String '([])' is balanced.
String '([)]' is NOT balanced.
String '](){' is NOT balanced.
String '([]{})' is balanced.
String '{[({}[])]}' is balanced.
String '(()(' is NOT balanced.
MacBook-Pro:perl hbirdi$ perl q4_balanced.pl
String '(())' is balanced.
String '(()(' is NOT balanced.
String '()()()()' is balanced.
String '()(())' is balanced.
String '(' is NOT balanced.
String '' is balanced.
MacBook-Pro:perl hbirdi$ perl q5_strip.pl
------------
INPUT STRING
------------
// this is a comment
/////// this is a comment too
{ // another comment
/////////////
true, "foo", // 3rd comment
"http://www.ariba.com" // comment after URL
"http://www.yahoo.com"// no space between text and comment after URL
"https://www.google.com"//no space between text and comment after URL
"https://www.google.com?ex=1" //no space between text and comment after URL
// This is a test http://www.pulse.com
"more than 2 slashes" ///// more than 2 slash comment
}
-------------
OUTPUT STRING
-------------
{
true, "foo",
"http://www.ariba.com"
"http://www.yahoo.com"
"https://www.google.com"
"https://www.google.com?ex=1"
"more than 2 slashes"
}
MacBook-Pro:perl hbirdi$