TAILIEUCHUNG - Minimal Perl For UNIX and Linux People 6

Tham khảo tài liệu 'minimal perl for unix and linux people 6', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | The double quotes around the argument are processed first forming a string from the space-separated list elements then the list context provided by the function is applied to that result. But a quoted string is a scalar and list context doesn t affect scalars so the existing string is left unmodified as print s argument. The join function listed in table provides the same service as the combination of and double quotes and is provided as a convenience for those who prefer to pass arguments to a function rather than to set a variable and double quote a string. We ll discuss this function later in this chapter. Now you understand the basic principles of evaluation context and the tools used for converting data types. With this background in mind we ll examine some important Perl functions that deal with scalar data next such as split. Then in section we ll discuss functions that deal with list data such as join. Programming with functions that GENERATE OR process scalars Table describes some especially useful built-in functions that generate or process scalar values which weren t already discussed in part 1. Table Useful Perl functions for scalars and their nearest relatives in Unix Perl built-in function Unix relative s Purpose Effects split The cut command AWK s split function the Shell s IFS variable Converting scalars to lists Takes a string and optionally a set of delimiters and extracts and returns the delimited default delimiter is any sequence of whitespace characters. localtime The date command Accessing current date and time Returns a string that resembles the output of the Unix date command. stat The ls -lL command Accessing file Provides information about the file lstat The ls -l command information referred to by stat s argument or the symbolic link presented as lstat s argument. chomp N A Removing newlines in data Removes trailing input record separators from strings using newline as the default. With Unix utilities .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.