Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Converting Visual Basic Code to PERL

by LAI (Hermit)
on May 16, 2003 at 12:48 UTC ( [id://258627]=note: print w/replies, xml ) Need Help??


in reply to Converting Visual Basic Code to PERL

harish, I have worked to convert and adapt a lot of programs from one language to another, and the best advice I can give you is to forget about doing a translation. Different languages often "think" in different ways, and Perl vs. VB is a perfect example of this. VB is by necessity full of hacks, it has screwed up structures and so forth.

Rather than trying to do a line-by-line conversion to Perl, start from scratch. In the long run, you will thank yourself (especially for small programs like this one).

LAI

__END__

Replies are listed 'Best First'.
Re: Re: Converting Visual Basic Code to PERL
by newrisedesigns (Curate) on May 16, 2003 at 12:58 UTC

    I wholeheartedly agree with LAI.

    When translating spoken language, do you do a direct translation? No. It's a rare occasion when one can run down a sentence with a dual-language dictionary and get a coherent sentence.

    Take for example English and Russian. Ignoring the Cyrillic and Latin character differences, both have some similar sounding words, but the grammar and syntax is completely different. Two languages that are more closely related are English and German (or French and Spanish). Same problem there. You can't simply translate, you have to interpret.

    First, figure out what you want to do in Perl. Is there any reason Perl is better suited than the already complete VB code? Then, start from scratch in Perl. Don't even look back at your VB. Construct something completely new (and better (always improve your code)) that accomplishes the same task.

    John J Reiser
    newrisedesigns.com

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://258627]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-03-28 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found