Commit | Line | Data |
---|---|---|
36b2db7e | 1 | use warnings; no warnings 'deprecated'; |
b82b06b8 FC |
2 | use strict; |
3 | ||
4 | use Test::More tests => 6; | |
5 | ||
6 | our $t; | |
7 | ||
8 | $[ = 3; | |
9 | ||
10 | $t = "abcdef"; | |
11 | is substr($t, 5), "cdef"; | |
12 | is $t, "abcdef"; | |
13 | ||
14 | $t = "abcdef"; | |
15 | is substr($t, 5, 2), "cd"; | |
16 | is $t, "abcdef"; | |
17 | ||
18 | $t = "abcdef"; | |
19 | is substr($t, 5, 2, "xyz"), "cd"; | |
20 | is $t, "abxyzef"; | |
21 | ||
22 | 1; |