|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Do Perl scripts which are fully working in UNIX, work in Linux and Apache? I know NT can cause problems.
Thanks for any response. Flink |
|
#2
|
|||
|
|||
|
Perl scripts are VERY portable between most OS'es. Just as long as you do not use OS specific system calls. For instance writing a Perl script that calls the UNIX/Linux 'ps' command can easliy be transfered from UNIX<->Linux, but you probably cannot run in on a windoze system (unless you have installed UNIX utilities on your windoze box).
Also, if you are porting from UNIX to NT (or vice verse), you have to contend with file path conventions. i.e. windows uses back slashes '\', while UNIX uses forward slashes '/'. However, these differences can be eliminated through careful planning or the use of configuration files. For instance, when i write Perl scripts on my windoze machines, i create config files that store filepaths and other variables so that when i upload my scripts on my web host running Linux, all i have to change is the filepaths in my config file, without modifying my code. Hope this helps. -Carlos |
|
#3
|
|||
|
|||
|
Perl is very platform independent. Even in instances that system calls must be made(eg.- writing some kind of system module), there is a variable in Perl that is dedicated to storing the OS type. Of course, that means that you have to program the functionality for all platforms but if you do it right, it shouldn't really be that much extra code.
The variable is '$^O' or (dollar-caret-Oh) Hope that helps
__________________
- dsb - ![]() Perl Guy |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > OS Compatibility |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|