Getting issue in inserting a line in between a file

2010-01-20 Thread harish behl
Hi,   I have to insert a line in the file. Issue after running the script:  It's inserting line like is also coming in the same line instead of coming in the separate line.    Present file : It should  be after updation like I have written the below code open(READFILE1, "<$file

Binary file conversion

2010-01-20 Thread Shan
Hi All, How to PACK the "C/A*" data type by using Convert::Binary:C module. Because the datatype is Pointer. Ex. binmode(S); @Data=("asd"); $binary=pack("C/A*",@Data);# its working fine print S $binary; I need by below ==

Re: how to convert perl file into binary

2010-01-20 Thread Jeff Peng
在 2010-01-21四的 10:51 +0530,V U Maheswara rao k写道: > Hi All, > > can I convert perl file into binary file? So that my code will be secure/. > perldoc -q 'hide the source' -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://

Re: how to convert perl file into binary

2010-01-20 Thread Uri Guttman
> "VUMrk" == V U Maheswara rao k writes: VUMrk> can I convert perl file into binary file? So that my code will VUMrk> be secure/. you can't do it securely. this is an FAQ (a real one asked very often). please read the FAQ for the full answer. uri -- Uri Guttman -- u...@stemsyste

how to convert perl file into binary

2010-01-20 Thread V U Maheswara rao k
Hi All, can I convert perl file into binary file? So that my code will be secure/. -- -Mahesh

Re: PERL binary conversion

2010-01-20 Thread Shan
Thank u for your quick reply. How to install following module.or How to install following module in my system.I'm working in WINDOWS NT. Convert::Binary::C;Thanks and Regards,Shan BTW, it's perl or Perl, but never PERL. I am guessing your new to this list because your making a few common fa

Re: Data file with records that span two lines

2010-01-20 Thread Uri Guttman
> "PN" == Perl Noob writes: >> the next question is do you understand what that code is doing? and >> what >> the <> operator does? and the -p option? don't just use that code >> without understanding it or you won't learn more perl. this list is >> about learning perl, not just get

Re: Data file with records that span two lines

2010-01-20 Thread Perl Noob
>> "PN" == Perl Noob writes: > > >> On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: > >>> On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) > >>> wrote: > >>> > ... > >>> > >>>  perl -ne '$_ .= <>;s/\n//;print' infile > outfile > >>> > >> > >> Even easi

Re: Data file with records that span two lines

2010-01-20 Thread Uri Guttman
> "PN" == Perl Noob writes: >> On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: >>> On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) >>> wrote: >>> > ... >>> >>>  perl -ne '$_ .= <>;s/\n//;print' infile > outfile >>> >> >> Even easier: perl -pe '$_

Re: Data file with records that span two lines

2010-01-20 Thread Perl Noob
> On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: >> On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) >> wrote: >> > ... >> >>  perl -ne '$_ .= <>;s/\n//;print' infile > outfile >> > > Even easier: perl -pe '$_ .= <>; s/\n//' infile > outfile > > -- > Charles DeRykus MAGI

Re: XML::Simple parsing with attributes

2010-01-20 Thread Brad Baxter
On 1/15/2010 2:11 PM, Grant wrote: Anybody here familiar with XML::Simple? I need to parse some XML that looks like this: base64datahere base64datahere base64datahere I need to be able to grab the correct set of base64 data. Does anyone know how to do that? - Grant The "correct set"?

Re: Data file with records that span two lines

2010-01-20 Thread C.DeRykus
On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote: > On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (Perl Noob) wrote: > > ... > >  perl -ne '$_ .= <>;s/\n//;print' infile > outfile > Even easier: perl -pe '$_ .= <>; s/\n//' infile > outfile -- Charles DeRykus -- To unsubscribe, e-m

Re: regex support for glob

2010-01-20 Thread Dr.Ruud
Shameem Ahamed wrote: I have files with digits as extensions. Like file.0, file.1 file.2..file.100,file.101 etc. I want to select only the first 30 files. I used glob("file.[0-4]?[0-9]") but it doesn't seem to be working. Try: "file.{[0-9],[0-4][0-9]}" (untested) Try also: pri

Re: passing a hash via cookie and dereferencing it

2010-01-20 Thread Brad Baxter
On 1/18/2010 2:10 PM, mike wrote: Hello everyone: I am trying to pass a hash of hashes from one script to another via a cookie. I can get the cookie to pass, but when I try to get the inner hash keys and values using what I think is the correct method, I cannot get them. Here are two scripts wh

Re: Data file with records that span two lines - REVISITED

2010-01-20 Thread Brad Baxter
On 1/19/2010 6:03 PM, Perl Noob wrote: I am AMAZED at the help available in this forum. It is an awesome resource. I can see, though, that my situation needs to be stated more clearly. The data is not consistent throughout the entire file. I WISH I only had to skip every other line. The prob

Re: regex support for glob

2010-01-20 Thread Shawn H Corey
Shameem Ahamed wrote: > Hi All, > > I am wondering how can i use the glob function to get only the first few > files. > > > I have files with digits as extensions. Like file.0, file.1 > file.2..file.100,file.101 etc. > > I want to select only the first 30 files. > > I used glob("file.[0

Re: regex support for glob

2010-01-20 Thread John W. Krahn
Parag Kalra wrote: On Wed, Jan 20, 2010 at 2:20 PM, Shameem Ahamed wrote: I am wondering how can i use the glob function to get only the first few files. I have files with digits as extensions. Like file.0, file.1 file.2..file.100,file.101 etc. I want to select only the first 30 files.

Re: regex support for glob

2010-01-20 Thread Parag Kalra
On the same lines I have question to all Perl Gurus. In this scenario can we following? And if Yes, how efficient it is? #!/usr/bin/perl #Author: Parag Kalra use strict; use warnings; # Creating 50 files - you can skip this foreach(1..50){ open my $fh, '>', 'file.'.$_; } my @Req_Input_Files;

regex support for glob

2010-01-20 Thread Shameem Ahamed
Hi All, I am wondering how can i use the glob function to get only the first few files. I have files with digits as extensions. Like file.0, file.1 file.2..file.100,file.101 etc. I want to select only the first 30 files. I used glob("file.[0-4]?[0-9]") but it doesn't seem to be working.