Lines Matching full:foo*

12 # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
39 @foo = ();
40 $r = join(',', $#foo, @foo);
42 $foo[0] = '0';
43 $r = join(',', $#foo, @foo);
45 $foo[2] = '2';
46 $r = join(',', $#foo, @foo);
71 $foo = 'now is the time';
72 if (($F1,$F2,$Etc) = ($foo =~ /^(\S+)\s+(\S+)\s*(.*)/)) {
84 $foo = 'lskjdf';
85 if ($cnt = (($F1,$F2,$Etc) = ($foo =~ /^(\S+)\s+(\S+)\s*(.*)/))) {
92 %foo = ('blurfl','dyick','foo','bar','etc.','etc.');
93 %bar = %foo;
94 print $bar{'foo'} eq 'bar' ? "ok 23\n" : "not ok 23\n";
96 print $bar{'foo'} eq '' ? "ok 24\n" : "not ok 24\n";
97 (%bar,$a,$b) = (%foo,'how','now');
98 print $bar{'foo'} eq 'bar' ? "ok 25\n" : "not ok 25\n";
100 @bar{keys %foo} = values %foo;
101 print $bar{'foo'} eq 'bar' ? "ok 27\n" : "not ok 27\n";
104 @foo = grep(/e/,split(' ','now is the time for all good men to come to'));
105 print join(' ',@foo) eq 'the time men come' ? "ok 29\n" : "not ok 29\n";
107 @foo = grep(!/e/,split(' ','now is the time for all good men to come to'));
108 print join(' ',@foo) eq 'now is for all good to to' ? "ok 30\n" : "not ok 30\n";
110 $foo = join('',('a','b','c','d','e','f')[0..5]);
111 print $foo eq 'abcdef' ? "ok 31\n" : "not ok 31\n";
113 $foo = join('',('a','b','c','d','e','f')[0..1]);
114 print $foo eq 'ab' ? "ok 32\n" : "not ok 32\n";
116 $foo = join('',('a','b','c','d','e','f')[6]);
117 print $foo eq '' ? "ok 33\n" : "not ok 33\n";
119 @foo = ('a','b','c','d','e','f')[0,2,4];
121 $foo = join('',(@foo,@bar)[0..5]);
122 print $foo eq 'acebdf' ? "ok 34\n" : "not ok 34\n";
124 $foo = ('a','b','c','d','e','f')[0,2,4];
125 print $foo eq 'e' ? "ok 35\n" : "not ok 35\n";
127 $foo = ('a','b','c','d','e','f')[1];
128 print $foo eq 'b' ? "ok 36\n" : "not ok 36\n";
130 @foo = ( 'foo', 'bar', 'burbl');
131 push(foo, 'blah');
132 print $#foo == 3 ? "ok 37\n" : "not ok 37\n";
139 @foo = @foo;
140 t("@foo" eq "foo bar burbl blah"); # 38
142 (undef,@foo) = @foo;
143 t("@foo" eq "bar burbl blah"); # 39
145 @foo = ('XXX',@foo, 'YYY');
146 t("@foo" eq "XXX bar burbl blah YYY"); # 40
148 @foo = @foo = qw(foo b\a\r bu\\rbl blah);
149 t("@foo" eq 'foo b\a\r bu\\rbl blah'); # 41
151 @bar = @foo = qw(foo bar); # 42
152 t("@foo" eq "foo bar");
153 t("@bar" eq "foo bar"); # 43
159 @bee = ( 'foo', 'bar', 'burbl', 'blah');
163 t("@bee" eq "foo bar burbl blah"); # 44
171 local @bee = local(@bee) = qw(foo bar burbl blah);
172 t("@bee" eq "foo bar burbl blah"); # 47
174 local (@bim) = local(@bee) = qw(foo bar);
175 t("@bee" eq "foo bar"); # 48
176 t("@bim" eq "foo bar"); # 49
178 t("@bee" eq "foo bar burbl blah"); # 50
184 t("@bee" eq "foo bar burbl blah"); # 53
191 t("@bee" eq "foo bar burbl blah"); # 54
199 my @bee = my @bee = qw(foo bar burbl blah);
200 t("@bee" eq "foo bar burbl blah"); # 57
202 my (@bim) = my(@bee) = qw(foo bar);
203 t("@bee" eq "foo bar"); # 58
204 t("@bim" eq "foo bar"); # 59
206 t("@bee" eq "foo bar burbl blah"); # 60
212 t("@bee" eq "foo bar burbl blah"); # 63
222 print "not " unless qw(foo bar snorfle)[2] eq 'snorfle';
239 sub foo { "a" }
240 @foo=(foo())[0,0];
241 $foo[1] eq "a" or print "not ";