Search Results

Search found 3393 results on 136 pages for 'perl'.

Page 8/136 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • perl escaping \n or \t

    - by Michael
    I need to escape \n so on output I really get newline or tab $ perl -p -e 's/e/a/ge' now I want each e to be substituted with \n $ perl -p -e 's/e/\n/ge' but even \n gives me an error. this was a simplified example. In real script(makefile) I have substitute := perl -p -e 's/@([^@]+)@/defined $$ENV{$$1} ? $$ENV{$$1} : $$1/ge' and in target I have such a nice command $(substitute) $< > $@ and if the input file for perl contains \n at output I will see it literally... I want to have real newline.

    Read the article

  • Perl - Internal File (create and execute)

    - by drewrockshard
    I have a quick question about creating files with perl and executing them. I wanted to know if it was possible to generate a file using perl (I actually need a .bat script) and then execute this file internally to the program. I know I can create files, and I have with perl, however, I'm wanting to do this internally to the program. So, what I want it to do is actually create a batch script internally to the program (no file is actually written to the disk, everything remains in memory, or the perl program), and then once it completes the writing of the file, I'd like to be able to actually execute this file, and then discard the file it just wrote. I'm basically trying to have it create a batch script on the fly, so that I can just have output text files from the output of the script, rather than creating the batch script on disk, then executing it, and then deleting the batch file from disk when its done. Can this be done and how would I go about doing this? Regards, Drew

    Read the article

  • Setting up a common perl/cpan environment

    - by zedoo
    Hi, so I'm having a lot of fun with Perl at home for some time now. How much more difficult do things get when you develop Perl modules (In my case it's mostly catalyst) in a team? How do we make sure we all got the same development environment (Perl/Module versions)? Simply by keeping up to date with CPAN? Do some teams setup their 'private' CPANs?

    Read the article

  • How to Insert a sub string to each line in perl

    - by Nano HE
    Hi, My code as below, How to remove the blank after add hello. to each lines. #!C:\Perl\bin\perl.exe use strict; use warnings; use Data::Dumper; my $fh = \*DATA; #my($line) = $_; while(my $line = <$fh>) { print "Hello.".$line; chomp($line); } __DATA__ Member Information id = 0 name = "tom" age = "20" Output: D:\learning\perl>test.pl Hello.Member Information Hello. id = 0 # i want to remove the blank between Hello. and id Hello. name = "tom" # same as above Hello. age = "20" # same D:\learning\perl>

    Read the article

  • DBD::Advantage and 64-bit Perl - Always 6060

    - by WarheadsSE
    I realize that I am attempting to go beyond the "supported" behavior of the manf's released drivers for perl, after all they have only released it in package with x86 .so's. However, since I cannot use their package with x64 Perl on a RHEL 5.4 x86_64 box, and maintaining a seperate install of x86 perl just for this one package, I have made an attempt to get this puppy working thanks to released 64-bit .so's that accompany other driver packages for Advantage. What I have done to this point: download beta 10 DBI drivers, in 32 download beta 10 PHP extension (it contains 32 and x86_64) copy the required DLLs into the ads-lib location (eg /usr/local/ads/lib64) compile the Perl DBI driver with the path to the lib64's .so's Good compilation, good install, good use. The problem is that I always get : failed: [iAnywhere Solutions][Advantage SQL][ASA] Error 6060: Advantage Database Server not available on specified server. axServerConnect (SQL-HY000)(DBD: db_login/SQLConnect err=-1) Does anyone have any ideas? EDIT: fixed package name in post title

    Read the article

  • perl program doesn't work in windows

    - by dexter
    i have written following in index.pl which is in=" C:\xampp\htdocs\perl "--folder #!/usr/bin/perl print "<html>"; print "<h2>PERL IT!</h2>"; print "this is some text that should get displyed in browser"; print "</html>"; when i type: http://localhost:88/perl/ the above HTML doesn't get displayed (i've tried in IE FF and chrome) what would be the reason?? i have xampp and apache2.2 installed in system (windows XP)

    Read the article

  • autehntication on gui application written on perl

    - by oren
    Its not specific perl question I am building a perl gui/wxperl application that connect to DB . I want my application to be a password protected i.e first the user should enter the user and password and then use the appication . what is the best secure method to store the password could someone provide an idea what is the best method to how should i store the user and the password and how should i retrieve them for authentication ? if possible could someone provide some perl code how to do this ?

    Read the article

  • Advice on coding Perl to work like PHP

    - by user272273
    I am first and foremost a perl coder, but like many, also code in PHP for client work, especially web apps. I am finding that I am duplicating a lot of my projects in the two languages, but using different paradigms (e.g. for handling cgi input and session data) or functions. What I would like to do is start to code my Perl in a way which is structured more like PHP, so that I a) am keeping one paradigm in my head b) can more quickly port over scripts from one to the other Specifically, I am asking if people could advise how you might do the following in perl? 1) Reproduce the functionality of $_SESSION, $_GET etc. e.g. by wrapping up the param() method of CGI.pm, a session library? 2) Templating library that is similar to PHP I am used to mixing my code and HTML in the PHP convention. e.g. i <h1>HTML Code here</h1> <? print "Hello World\b"; ?> Can anybody advise on which perl templating engine (and possibly configuration) will allow me to code similarly? 3) PHP function library Anybody know of a library for perl which reproduces a lot of the php inbuilt functions?

    Read the article

  • What is dmake actually doing when installing a new module?

    - by aj-sin-dhal
    I just mangaged to install the perl/Tk module after much struggle. I realise I don't understand what dmake or make etc is actually doing. I am using strawberry perl installed at C:\strawberry. Fisrt I unpacked the module to another directory and ran perl makefile.pl which worked fine. Then I tried dmake which did not work. I guess that will be obvious to people who know how this works. When I placed the module as a sub-directory of C:\strawberry I could run perl makefile.pl, dmake, dmake test and dmake install. My guess is that dmake install is adding some executable files to the interpreter and to work the module must be in a subdirectory. Is there any article anywhere that explains what it is doing in detail?

    Read the article

  • .NET equivalent to Perl regular expressions

    - by r_honey
    I need to convert a Perl script to VB.NET. I have managed almost the entire conversion, but some Perl (seemingly simple) regex are causing an headache. Can someone suggest me .NET equivalent of the following perl regex: 1) $letter =~ s/Users //,; $letter =~ s/Mailboxes //,; if($letter =~ m/$first_char/i){ 2) unless($storegroup =~ /Recovery/ || $storegroup =~ /Users U V W X Y Z/ || $storegroup =~ /Users S T/ || $storegroup =~ /Users Q R/){ The regex look simple to me. I tried to wade through perl.org but understanding a langugae regex takes sometime and I need to complete the conversion quickly.

    Read the article

  • Perl vs Python but with more style than normally

    - by user350571
    I'm learning perl and everytime I search for perl stuff in the internet I get some random page with people saying that perl should die because code written in it looks like a lesson in steganography. Then they say that python is clean and stuff like that. Now, I know that those comparisons are always stupid and made by fellows that feel that languages are a extension of their boring personality so, let me ask instead: can you give me the implementation of a widely known algorithm to deal with a data structure like red-black trees in both languages so I can compare?

    Read the article

  • Perl equivalent to Java's "throws" clause

    - by Konerak
    Is there a way in Perl to declare that a method can throw an error (or die)? EDIT: What interests me the most is a way to get the compiler or IDE to tell me I have an unchecked exception somewhere in my code. I always loved how in Java, a method could handle an Exception and/or throw it. The method signature allows to put "throws MyException", so a good IDE/compiler would know that if you use said method somewhere in your code, you'd have to check for the Exception or declare your function to "throws" the Exception further. I'm unable to find something alike in Perl. A collegue of mine wrote a method which "dies" on incorrect input, but I forget to eval-if($@) it... offcourse the error was only discovered while a user was running the application. (offcourse I doubt if there is any existing IDE that could find these kind of things for Perl, but atleast perl -cw should be able to, no?)

    Read the article

  • Differences between Perl and PHP

    - by lok
    I'm planning to lern Perl 5 and as I have only used PHP until now, I wanted to know a bit about how the languages differ from each other. As PHP started out as a set of "Perl hacks" it has obviously cloned some of Perls features. What are the main differences in the syntax? Is it true that with Perl you have more options and ways to express something? Why is Perl not used for dynamic websites very often anymore? What made PHP gain more popularity than it?

    Read the article

  • Perl vs Python: implementation of algorithms to deal with advanced data structures

    - by user350571
    I'm learning perl and everytime I search for perl stuff in the internet I get some random page with people saying that perl should die because code written in it looks like a lesson in steganography. Then they say that python is clean and stuff like that. Now, I know that those comparisons are always stupid and made by fellows that feel that languages are a extension of their boring personality so, let me ask instead: can you give me the implementation of a widely known algorithm to deal with a data structure like red-black trees in both languages so I can compare?

    Read the article

  • How do I upgrade my MacPorts Perl installation?

    - by sfactor
    I have installed MacPorts in my MacBook Pro with Snow Leopard. I hadn't explicitly installed perl there but I guess it either came installed with the default macports install or was installed as a dependency by any other port I installed. I want to upgrade the Perl v5.8.9 there with the latest stable Perl version. Whichever it may be currently (I see it is 5.12.2). So, my question is simply how do I do a complete replacement of the old Perl with the new in macports. Will sudo port upgrade perl5 work or do I need to do something else as well. I just wanted to make sure this was the right command so as to avoid screwing up my macports install.

    Read the article

  • Active Perl Installation on Windows operating system

    - by pavun_cool
    Hi all. I have installed the Active perl in my windows OS. I have followed below url procedure to install Active Perl Installation after done with that .. I have tried to run "perl -v " in command line . But it says me following error. The system cannot execute the specified prgoram Now What I need to do to solve this issues .. Any one help me out of this problem... Thanks ..

    Read the article

  • authentication on gui application written on perl

    - by oren
    Its not specific perl question I am building a perl gui/wxperl application that connect to DB . I want my application to be a password protected i.e first the user should enter the user and password and then use the appication . what is the best secure method to store the password could someone provide an idea what is the best method to how should i store the user and the password and how should i retrieve them for authentication ? if possible could someone provide some perl code how to do this ?

    Read the article

  • perl split on empty file

    - by Casey
    I have basically the following perl I'm working with: open I,$coupon_file or die "Error: File $coupon_file will not Open: $! \n"; while (<I>) { $lctr++; chomp; my @line = split/,/; if (!@line) { print E "Error: $coupon_file is empty!\n\n"; $processFile = 0; last; } } I'm having trouble determining what the split/,/ function is returning if an empty file is given to it. The code block if (!@line) is never being executed. If I change that to be if (@line) than the code block is executed. I've read information on the perl split function over at http://perldoc.perl.org/functions/split.html and the discussion here about testing for an empty array but not sure what is going on here. I am new to Perl so am probably missing something straightforward here. Thanks.

    Read the article

  • Well written Perl Open Source to learn from ?

    - by Prix
    Hi, is there any well written perl open source out there (not using any kinda of framework) that i could use as sample for learning and good pratice of the perl... I've searched around and found many things for PHP, but nothing in perl that uses no framework. Thanks in advance.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >