Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Assign STDIN to the default var
  2. $_=<>;
  3. # Assign X
  4. $x="tp://";
  5. # Print
  6. print
  7. # check if the default var DOES NOT has a colon
  8. /^(?!.*:)/?
  9. # if false return the default var
  10. :$_
  11. # if true check if it has a dot
  12. /\./?
  13. # if true return http://$_
  14. "ht$x$_":
  15. # if false return fttp://$_
  16. "f$x$_"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement