Shell Programming and Scripting

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Converting shell to Perl I run into shell built in function trap and need alternative in Perl

👤 Login to reply

    #1  
Old 03-22-2017
digioleg54 digioleg54 is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 25 June 2018, 7:40 AM EDT
Posts: 112
Thanks: 17
Thanked 3 Times in 3 Posts
Converting shell to Perl I run into shell built in function trap and need alternative in Perl

I am working on converting shell to Perl script. In shell we have built in function
Code:
 trap

Do you know alternative in Perl or actually we don't need it?

Thanks for contribution
Sponsored Links
    #2  
Old 03-22-2017
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 21 July 2018, 7:14 PM EDT
Location: Foxborough, MA
Posts: 8,314
Thanks: 260
Thanked 842 Times in 786 Posts
I'd start here
The Following User Says Thank You to vgersh99 For This Useful Post:
drl (03-23-2017)
Sponsored Links
    #3  
Old 03-22-2017
digioleg54 digioleg54 is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 25 June 2018, 7:40 AM EDT
Posts: 112
Thanks: 17
Thanked 3 Times in 3 Posts
I did, but I don't know why shell is using trap. It is clean directories and exit
    #4  
Old 03-22-2017
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 21 July 2018, 7:14 PM EDT
Location: Foxborough, MA
Posts: 8,314
Thanks: 260
Thanked 842 Times in 786 Posts
Quote:
Originally Posted by digioleg54 View Post
I did, but I don't know why shell is using trap. It is clean directories and exit
... or to do whatever 'cleanup' needs to be done (based on the script functionality)
The Following User Says Thank You to vgersh99 For This Useful Post:
digioleg54 (03-22-2017)
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl newbie_01 Shell Programming and Scripting 3 11-06-2011 01:26 AM
Shell script calling Perl function, sort and find data, write to new files kowit010 Homework & Coursework Questions 6 11-02-2011 09:39 PM
Perl - pass shell-vars into perl for input loop alex_5161 Shell Programming and Scripting 4 03-19-2010 02:11 PM
Converting Perl code to shell zainravi Shell Programming and Scripting 8 03-12-2009 12:54 PM
Converting bash shell to perl freak UNIX for Dummies Questions & Answers 4 05-29-2008 12:35 AM



All times are GMT -4. The time now is 08:52 PM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?