in reply to Re^3: To print the file in spool with the new format of input file also
in thread To print the file in spool with the new format of input file also
Here's some explanatations and links (the useful kind, I hope):
unless is a negated if. Just like if executes certain code if a condition is true, unless executes it if it is not - that is to say, it executes the code unless the condition is true. See Compound Statements for more.
=~ is the regular expression binding operator. With a "regular" regular expression (rather than a substitution or transliteration), it matches a variable ($basename) against a regular expression. If you're not familiar with regular expressions, think of it as a pattern describing what the contents of $basename should look like. See perlop.html#Binding-Operators for more on the =~ operator, and perlretut and perlre for more on regular expressions.
If you're new to Perl, there's a number of helpful books as well, e.g. Learning Perl and Beginning Perl; I also highly recommend Programming Perl, affectionally known as "The Camel". (There's many more books, but they're not necessarily well-suited for beginners.)
|
|---|