Replace words in a file using perl script

2011-12-16 Thread Melvin
Hi, I am a Perl baby :-) I was trying to write a script to replace baby to bigboy in a file:- However the below script doesn't work Could someone help me??? #!/usr/bin/perl -w use strict; open (FILE_IN , $ARGV[0]) || die (ERROR: Gimme Input pleease); my @array_of_lines = FILE_IN; foreach my

Re: Removing out new lines

2011-12-06 Thread Melvin Simon
Thanks a lot Rob. chomp command did the job as you suggested. Also, to add I manually did it in gvim using the j in command mode. Thanks, Melvin On Sun, Dec 4, 2011 at 3:14 AM, Rob Dixon rob.di...@gmx.com wrote: On 01/12/2011 14:43, Melvin wrote: Hi I have a file in the following format

Removing out new lines

2011-12-03 Thread Melvin
Hi I have a file in the following format 111 222 333 Now I need to print the following output from the given input file as 111 222 333 Is there a way I can do this in perl? I tried 2 ways (both ere essentially the same) 1) Parsing the file and pushing the inputs to a string array. However

Deleting a line from one place and inserting it in another place

2011-07-16 Thread Melvin
files (I couldn't find this info in the Perl Document with me) Thanks in advance Melvin -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Problems with DDE.pm

2005-09-19 Thread Joe Melvin
Let me preface this message with an honest assertion that I'm not very knowledgeable about Perl modules or DDE's. I have written a script using the DDE.pm module. Sometimes it runs for hours, happily doing what it's supposed to do. Other times, it cries out: Undefined subroutine main::

Re: Problems with DDE.pm

2005-09-19 Thread Joe Melvin
Sorry - the real name of the module is Win32::DDE: Joe Melvin wrote: Let me preface this message with an honest assertion that I'm not very knowledgeable about Perl modules or DDE's. I have written a script using the DDE.pm module. Sometimes it runs for hours, happily doing what it's

Re: Problems with DDE.pm

2005-09-19 Thread Joe Melvin
John W. Krahn wrote: I would *guess* that some part of DDE is expecting a callback sub but is not getting it. IIRC, DDE was introduced for Windows 3.1 and is not used anymore. Sadly, in the world of ham radio software, nothing ever dies. DDE and serial ports are about as cutting-edge as