here's the code:#$files[0] = '/usr/local/bin/foobar/a.html' #$files[1] = '/usr/local/bin/foobar/b.html' #$files[2] = '/usr/local/bin/foobar/c.html' #$files[3] = '/usr/local/bin/foobar/d.html' #$files[4] = '/usr/local/bin/foobar/e.html' #$files[5] = '/usr/local/bin/foobar/f.html'
Splitting works fine$tracker = <<EOQ; a.html<br> b.html<br> c.html<br> d.html<br> e.html<br> f.html<br> EOQ $path = "/usr/local/bin/foobar/";
@ttt = split /<br>\n/, $tracker; for (@ttt) { print "$_\n"; }
My Question:
Should I be trying to do this by splitting and joining at once or is it better to do it in two separate calls? I guess I need to parenthesize things?
p220 of the Camel book 2nd ed. has this line:
print join ':', split / */, 'hi there';
Can I do something similar?
This part doesn't work yet:@files = join split /<br>\n/, $tracker, $path; foreach (@files) { print "$_\n" }
Thanks!
Edit ar0n 2001-07-27 -- fixed formatting
In reply to precedence: two functions on one line by kingman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |