CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Converting shell to Perl found problem

 



digioleg54
User

Mar 22, 2017, 12:58 PM

Post #1 of 4 (1975 views)
Converting shell to Perl found problem Can't Post

I am converting shell to Perl scripts. In shell we have trap built in function. Perl has %SIG or sigtrap. I know it is using to catch signal. But I am not sure if I need it in my perl. Any advice?


FishMonger
Veteran / Moderator

Mar 22, 2017, 1:21 PM

Post #2 of 4 (1967 views)
Re: [digioleg54] Converting shell to Perl found problem [In reply to] Can't Post

It's impossible to answer that question without seeing any code or reasonable explanation of what your code needs to do.

It sounds like you're trying to do a literal 1to1 syntax conversion, which is never the proper thing to do.


digioleg54
User

Mar 22, 2017, 1:31 PM

Post #3 of 4 (1965 views)
Re: [FishMonger] Converting shell to Perl found problem [In reply to] Can't Post

shell script is just cleaning some directories.
I call another script, which is cleaning directory for example from files 60 dais old.


Laurent_R
Veteran / Moderator

Mar 23, 2017, 3:10 AM

Post #4 of 4 (1957 views)
Re: [digioleg54] Converting shell to Perl found problem [In reply to] Can't Post

We would still need more information about what you want to do, but my first feeling is that you most probably don't need to trap signals for your purpose.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives