$ perl -le 'print for split m@/@, "foo/bar/baz"' foo bar baz