troubleshooting Question

Can we use alias in a perl script

Avatar of AmitBAcharya
AmitBAcharyaFlag for India asked on
4 Comments2 Solutions695 ViewsLast Modified:
I have an alias 'push_hermes' defined under /home/www/.bashrc -
alias push_hermes='cd ~/supervision/hermesAdmin; perl $*'

While I am trying to use this alias in a perl script -
system ("push_hermes $site_name $project_name push"), the system() command doesn't seem to recognise the push_hermes alias.

As a work around, I discontinued the use of the alias and made it inline in the perl script and it is working now. But I wanted it know, if it is possible to use an alias in the perl script?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros