How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask maomd Your Own Question
maomd
maomd, Programming Enthusiast
Category: Programming
Satisfied Customers: 799
Experience:  Programming from scratch for over seven years
31474244
Type Your Programming Question Here...
maomd is online now
A new question is answered every 9 seconds

Can someone interpret PERL language in layman's terms?

Customer Question

Can someone interpret PERL language in layman's terms? see 5 lines below..thx perl -i -pe 's/story_content/\./g;' -pe 's/mobile\///g;' -pe 's/<body/<body\ class="bt_passthrough"/g;' -pe 's/width=device-width/width=1040/g;' -pe 's///g;' story_html5.html cat ~/prepend.js | cat - player_compiled.js > temp && mv temp player_compiled.js perl -i -pe 's/(TinCanClient\.prototype\.init.*?)document\.location\.search\.substr\(1\)/$1searchString/g;' -pe 's/\$\(document\)\.bind\("ready",/player\.startPlayer\ =/g;' -pe 's/\)\;player\.forceRepaint=function\(\)/\;player\.forceRepaint=function\(\)/g;' player_compiled.js perl -i -pe 's/mobile\///g;' -pe 's/story_content//g;' -pe 's/slides\///g;' data.js player_compiled.js perl -i -pe 's/mobile\///g;' -pe 's/story_content//g;' meta.xml perl -i -pe 's/story_content/\./g;' *.js

Submitted: 10 months ago.
Category: Programming
Expert:  maomd replied 10 months ago.
Hello and thank you for allowing us to answer your question today.Looking into this code, it's a mix of regex bash commands. It essentially takes quite a bit of the characters and replaces it.
Expert:  maomd replied 10 months ago.
For example:perl -i -pe 's/story_content/\./g;' -pe 's/mobile\///g;' -pe 's/This will take story_content and replace it with a period (.) and then takes and replaces it with , then width=device-width with width=1040 and finally removes all spaces.
Expert:  maomd replied 10 months ago.
Here is a good example of how it's used: http://stackoverflow.com/questions/13043344/search-and-replace-in-bash-using-regular-expressions
Expert:  maomd replied 10 months ago.
Let me know if you would like to know more, other wise you may rate my answer at your convenience.Thanks!
Customer: replied 10 months ago.

Can you do this 4 each Pearl command..or do I need a separate questions for each one? Thanks man and I

Customer: replied 10 months ago.

Can you reply to my question? thanks-

Expert:  maomd replied 10 months ago.
Hey Mike, sorry about the delay. I'll be more than happy to translate each command for you. I should have it for you in a couple of hours from now.
Customer: replied 10 months ago.

If you can't answer, can you send this request to someone else?

Related Programming Questions