#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Pls help with this code


    Can someone please help me to either print the following string, or print it for me and post the result.

    $_=q;elw.ob/otfuka;;y;a-z;x-za-w;;print

    Many Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    828
    Rep Power
    496
    Hi,

    you could reformat it the following way:

    Code:
    $_ = q;elw.ob/otfuka;;
    y;a-z;x-za-w;;
    print;
    The first line is equivalent to:

    Perl Code:
    $_ = "elw.ob/otfuka";


    The second line is doing a character substitution with a 3-position offset in the alphabet.

    So it transforms "elw.ob/otfuka" into "bit.ly/lqcrhx".

    The third line just prints the result.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,923
    Rep Power
    1225
    Code:
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    $_=q;elw.ob/otfuka;;y;a-z;x-za-w;;print
    D:\test>timsim.pl
    bit.ly/lqcrhx
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    tx for your help


    thank you for your help so far however im not sure what to do with it to understand it can you help me further pls tx tim
  8. #5
  9. Recovering Intellectual
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2006
    Location
    Orange County, CA
    Posts
    1,306
    Rep Power
    785
    What do you mean you dont know what to do with it? You asked a question, how do i print this. The question was answered. Its up to you what to do with that now.

    What was this from? A task? Assignment in class? What do you want to know?
    Bugs that go away by themselves come back by themselves
    Beware - your loyalty will not be rewarded
  10. #6
  11. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,376
    Rep Power
    1871
    This and that

    But that was like 6 months ago, I hope it isn't perishable.

    In case you don't know, bit.ly is another one of those URL shortening services.

    Comments on this post

    • Matt1776 agrees : Ok ... W .. T .. F .. is that? Geo-caching? Perishable? SMH @ The Internet.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    tx


    thank you for every ones help i understand to use it as a url now and have the answer i need

IMN logo majestic logo threadwatch logo seochat tools logo