Passing Perl Variables back to Shell Script

Associate
Joined
3 Oct 2004
Posts
68
Location
Biggin Hill
As the title is this possible? I am calling a perl script from within a shell script and wish to pass back a variable from the Perl script to the shell script?

If this is not possible how would I code in shell a test that a string has at least one upper case character, one lower case character and a number?

Any help would be great
 
If you want to do the comparison in Shell then some versions of grep support regular expressions. Look on the man pages for grep and egrep to see the various options, there's quite a lot of them.

Alternatively, you could write a small Perl program (possibly a single line executed directly in the shell) that takes as a parameter the text to compare and returns the true or false value of a regular expression match against that text.

Hope that helps.
 
Back
Top Bottom