Category:Perl

  • Perl script and configuration file of FTP auto upload file

    Time:2019-11-12

    The basic concepts of this application design are:Toolbox reuse: use existing tools as much as possible;Simplify the operation steps; without introducing too much business logic, the simpler the requirements are, the better. Therefore, we have defined that this application depends on the operation of the following tools:ActivePerl-5.8.4.810-MSWin32-x86Upload.plUpload.config We put the main execution logic in the […]

  • Wrote a Perl removal program

    Time:2019-11-11

    Have you ever encountered the phenomenon that there are too many directory files on UNIX that cannot be deleted? I wrote a Perl program for you to delete Copy codeThe code is as follows: cat > del.pl#!/usr/bin/perl $file1=$ARGV[0]; @tests=(1,2,3,4,5,6,7,8,9,’A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’G’,’K’,’L’,’M’,’N’,’O’,’P’,’Q’,’R’,’S’,’T’,’U’,’V’,’W’,’X’,’Y’,’Z’); foreach  $test(@tests) { $file=$file1.$test; @chars=(0,1,2,3,4,5,6,7,8,9,’A’,’B’,’C’,’D’); foreach $char(@chars) { `rm $file$char*`; } `rm $file*`; } `rm $file1*`; 

  • A set of Perl problems

    Time:2019-11-10

    What is Perl? Perl is a high-level programming language, written by Larry wall and many others, which integrates the features of many languages. It is mainly evolved from the ubiquitous C language, followed by sed, awk, UNIX shell and at least ten other tools and languages. Perl has a strong ability to process and transform […]

  • Perl FAQ Set II

    Time:2019-11-9

    Which platforms have Perl? Where to find it? Perl’s standard release (maintained by the Perl development team) is only released as source code. You can find it at http://www.perl.com/cpan/src/latest.tar.gz. The format of this file is POSIX tar cabinet, which is compressed in gzip format. This code can be easily compiled and installed on most UNIX […]

  • A good simple application of mod? Perl programming

    Time:2019-11-8

    Introductory guideMod Perl is a huge and complex tool. It has many built-in modules to help you easily build dynamic websites. The purpose of this guide is to help you build a good mod Perl module and understand the implementation technology of mod Perl. I don’t recommend using the techniques described here to build a […]

  • [Perl] text / code batch replacement tool

    Time:2019-11-7

    The Perl script batchreplace.pl can be used to batch replace text / code in a file. You can find files of the specified type in the specified directory, and recursively check the subdirectory; copy the directory structure of the input file when exporting the file. [attachment] the Win32 Application Program batchreplace.exe is an executable program […]

  • A good learning CGI script (script)

    Time:2019-11-4

    Learning CGI scripts(script)CGI means common gateway interface, a program method based on browser input and running on Web server. CGI script enables your browser to interact with users. In order to find a noun in the database, provide comments you write, or select several items from a form and get a clear answer. If you […]

  • Specify what Perl is

    Time:2019-11-3

    What is Perl?Perl is the abbreviation of practical extraction and report language. It is designed by Larry wall and updated and maintained by him continuously for programming in UNIX environment.Perl has the power and flexibility of a high-level language such as C. In fact, as you will see, many of its features are borrowed from […]

  • Perl simple variable integer floating point number string

    Time:2019-11-2

    Basically, a simple variable is a data unit, which can be a number or a string.I. integer1, integerPerl is the most commonly used simple variable. Because it is basically the same as other languages, it will not be repeated.Example:   $x = 12345;   if (1217 + 116 == 1333) {   # statement block goes here   }Limit […]

  • Perl operator details

    Time:2019-11-1

    I. arithmetic operators: + (plus), – (minus), * (multiply), / (divide), * (power),% (remainder), – (single negative)The radix of (1) power cannot be negative, for example (- 5) * * 2.5 × error;The (2) power result cannot exceed the limit of computer representation, such as 10 * * 9999 ා error(3) if the remainder operand […]

  • Perl list and array variables

    Time:2019-10-31

    First, listList is a sequence of values contained in brackets. It can be any value or empty, for example: (1,; 5.3,; “hello”,; 2), empty list: ().Note: a list containing only one value (e.g., (43.2)) is different from the value itself (i.e., 43.2), but they can be converted or assigned to each other.List example:    (17, $var, “a string”)     (17, 26 << 2)     (17, $var1 + $var2) […]

  • Perl file read-write details

    Time:2019-10-30

    I. opening and closing filesThe syntax is open (filevar, filename), where filevar is the file handle, or the code used to represent a file in the program, filename is the file name, and its path can be relative or absolute.    open(FILE1,”file1″);    open(FILE1, “/u/jqpublic/file1”);Access mode must be determined when opening files. There are three access modes in Perl: […]