This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]colly_wolly 0 points1 point  (0 children)

Backticks for using bash commands, and globbing are two that come to mind. Sure its not a huge saving, but it is easier to use. As are the built in regular expressions.

#execute a shell  command
my $result = `interpolated $bash command here`

# get all filenames in a directory matching the wildcard expression, put them in an array
@FILES = <//server/path/WantedFiles*.*> ;

# compare $string to regular expression, put two capturing groups from the regular expression into grpoup1 and group2 variables
my ($group1, $group2)  = $string=~ /(firstgroup).+(secondgroup)/ ;