skip to main | skip to sidebar

Perl Programming Language Tutorial

Pages

  • Home
 
  • RSS
  • Twitter
Saturday, October 13, 2012

Perl function to check whether the passed path is write able or not

Posted by Raju Gupta at 9:13 AM – 1 comments
 

The function makes sure that the path (directory and/or file) passed to it as an Input parameter is write able or not.

 
use constant SUCCESS => 1; 
use constant FAILURE => 0; 

sub fint_is_write ($)
{
        #Arguments: The path to be checked.
        my($mstr_path) = @_;
        my $mint_retval = SUCCESS; #This holds the return value
        $mint_retval = FAILURE if (!-w $mstr_path);
        return $mint_retval;
} # end of fint_is_write



Email This BlogThis! Share to X Share to Facebook

One Response so far.

  1. Unknown says:
    October 14, 2015 at 2:28 AM



    U Minh tông thì Nhạc Thành không cần lo lắng hiện tại U Minh tông đã không còn cường giả, trong tứ phái có thể đối phó được, còn Luyện Dược sư công hội thì mình đối phó.

    - Cái gì, ngươi đự định đi thành Đan lôi?

    Ở trong phòng, Hỏa Lão nghe Nhạc Thành nói thì kinh ngạc.

    - Không sai, vãn bối định đi một chuyến, sau đó chúng ta tới Thần Hoàng Tộc luôn.

    Nhạc Thành cất tiếng nói.

    - Ngươi lo lắng Luyện Dược sư công hội phản kích với Hồ Điệp cốc sao?

    Hỏa Lão cdongtam
    mu moi ra hom nay
    tim phong tro
    http://nhatroso.com/
    nhạc sàn
    tổng đài tư vấn luật
    văn phòng luật hà nội
    tổng đài tư vấn luật
    thành lập công ty trọn gói
    http://we-cooking.com/
    chém gió
    trung tâm tiếng anhất tiếng nói:

    -Luyện Dược sư công hội có thực lực rất mạnh, ngươi muốn tới thành Đan lôi động thủ sao?

    - Đến lúc đó rồi xem, hiện tại chúng ta tới thành Đan Lôi.

    Nhạc Thành cất tiếng nói.

    Mấy ngày kế tiếp Nhạc Thành ở cùng một chỗ với chúng nữ, hiện tại đã mấy năm không gặp,

Leave a Reply

Newer Post Older Post
Subscribe to: Post Comments (Atom)
  • Popular
  • Recent
  • Archives

Popular Posts

  • Perl function to compare two dates
    This function can be used to compare two dates using PERL. The function accepts two string(date) arguments, let's say date1 and date2...
  • Perl function to check whether the passed path is runnable or not
    The function makes sure that the path (directory and/or file) passed to it as an Input parameter is run able or not. use constant SUCCES...
  • Perl script to find files older than x minutes
    This script can be used to find files in a windows directory older than 40 min. List can be emailed to a user also. Script can be modi...
  • Sepearte First name and last name by using PERL regular expressions
    We are using PERL regular expression. We are using 3 functions prxparse,prxmatch and prxposn. Prxparse takes regularexpression an...
  • Perl function to check whether file or dir name passed to it readable or not
    The function makes sure that the path (directory and/or file) passed to it as an Input parameter is readable or not   use constant SU...
  • Login screen using Perl
    This code snippet takes one parameter for default user and displays a login screen asking for user name and password . It aslo provides a...
  • File size and modified time
    When we pass the file name (include full path) as parameter,It will give us the size of the file and last modified time. sub getFileSt...
  • Perl function to trim leading and trailing spaces from a string
    Leading and trailing spaces, if any present, are trimmed and the string is returned back to the caller. If a NULL string is passed, the func...
  • Perl function to check whether the passed path is empty or not
    The function makes sure that the path (directory and/or file) passed to it as an Input parameter is empty or not. use constant SUCCESS ...
  • Fix Message Reader from Log
    Various subroutines of the package FixUtil can be used to read fix message (tag, value pair). Fix message can be extracted. Tag and Value ca...
Powered by Blogger.

Archives

  • ▼  2012 (24)
    • ▼  October (24)
      • Sepearte First name and last name by using PERL re...
      • Validate Info-Perl Script
      • Print Message--Perl Script
      • Password encryption-Perl Script
      • Convert to Seconds--Perl script
      • File size and modified time
      • Convert to minute-Perl script
      • Login screen using Perl
      • Huge text file comparator
      • Parse Input - Perl Script
      • Get colored difference - Perl Script
      • Perl function to compare two dates
      • Script to rotate any log file
      • Cross Referencing script
      • Random Bunch Creation in Perl
      • NASDAQ Status checker using Perl
      • Fix Message Reader from Log
      • Perl script to find files older than x minutes
      • Perl function to check whether the passed path is ...
      • Date Arimatic
      • Perl function to trim leading and trailing spaces ...
      • Perl function to check whether the passed path is ...
      • Perl function to check whether file or dir name pa...
      • Perl function to check whether the passed path is ...
 

Followers

Labels

  • File Searching Example (1)
  • Perl Date Example (2)
  • Perl Encryption Example (1)
  • Perl File Example (2)
  • Validation Example (1)
 
 
© 2011 Perl Programming Language Tutorial | Designs by Web2feel & Fab Themes

Bloggerized by DheTemplate.com - Main Blogger