vi + which

Sometimes, you want to look at the command (where is it located), and then, you decide to actually take a look inside the file (e.g. script). Instead of copying and pasting location, do following

which perl
vi `!!`