Help converting perl4 code to perl5: Example 1 
Author Message
 Help converting perl4 code to perl5: Example 1

I do one of these:
require "/usr/local/www/cgi-bin/module/fonts.list";

This file is just filled with things like this....

#!/usr/local/bin/perl
$font1 = qq|<font size=1 face="arial,helvetica">|;
$font2 = qq|<font size=2 face="arial,helvetica">|;
$font3 = qq|<font size=3 face="arial,helvetica">|;
$font4 = qq|<font size=4 face="arial,helvetica">|;
$font5 = qq|<font size=5 face="arial,helvetica">|;
$font6 = qq|<font size=6 face="arial,helvetica">|;
$font7 = qq|<font size=7 face="arial,helvetica">|;
$font8 = qq|<font size=8 face="arial,helvetica">|;
$font9 = qq|<font size=9 face="arial,helvetica">|;
$font10 = qq|<font size=10 face="arial,helvetica">|;

Then I use the code like this:
print qq|$font3 Hello, is this the real world?\n|;

This really is just a time and space saver for writing code.
This file is used by about 20 programs throught the server...

1.) How would one convert this so that it would not
smash some other name space

2.) How would I make all of these variables available to all
of the modules that 'use'

3.) Is there an easier way of doing this that I need to look at.

Questions like this, is what I am baffled with.

Thanks,
Christopher James      



Sat, 17 Jun 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help converting perl4 code to perl5

2. converting from perl4 to perl5

3. Converting a Perl4 script to Perl5

4. Converting perl5 -> perl4

5. socket code works under perl4 but not perl5

6. Help with Perl4 -> Perl5

7. PoCo::IRC dcc chat example / code snipped / help ?

8. Code example help?

9. Any software convert html code into perl code??

10. Newbie Help: example 1 works example 2 doesn't:

11. perl4.036 to 5.003 code breaks

12. Memory leak in Perl4 - common CGI code.

 

 
Powered by phpBB® Forum Software