Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Finally linking issues using perl

by gpssana (Initiate)
on Apr 17, 2017 at 04:50 UTC ( [id://1188079]=perlquestion: print w/replies, xml ) Need Help??

gpssana has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Finally linking issues using perl
by marto (Cardinal) on Apr 17, 2017 at 07:48 UTC

    One problem associated with crowd sourcing your work is that you won't know how to fix it.

Re: Finally linking issues using perl (101)
by Anonymous Monk on Apr 17, 2017 at 06:27 UTC

    Hi, this is confusing way to write code

    sub yada { ... } print ...; yada(); sub yadda {} print...; yadda();

    If there is a problem with yada, or with the way you call yada, its difficult to tell, for no real reason, code doesn't need to be that confusing

    You should write code like this

    #!/usr/bin/perl -- Main( @ARGV ); exit( 0 ); sub Main { print ...; yada(); print ...; yadda(); ...; } sub yada { ... } sub yadda { ... }

    Why write code this way?

    Well if there is a problem with yadda or the way you call yada

    Its super easy to delete all parts of the program that are not yada and then you you can fix yada easily,

    Even if yadda is only a smart part of your large program

    If you want to figure this out yourself this is what you have to do

    If you want other people to help you figure this out, this is what you have to do

    Are you going to do this?

Re: Finally linking issues using perl
by Corion (Patriarch) on Apr 17, 2017 at 06:21 UTC

    Who gave you that suggestion and where do you have problems applying that suggestion?

      i passed my sub routine before html conversion and call it inside if condition inside the html conversion part
      Error: Unexpected directory configuration. Expected single rev* +folder, found 0 folder(s) at ./generate_dcms_html.pl line 404,

        Perl tells you the problematic line number in the error message.

        You posted a lot of code, but it is not clear to me, which line of the code corresponds to the line number 404 from the error message. Maybe the code around that line number is more relevant?

      Actually i had tried that suggestion part to link some files.Instead i had also tried another sub routine part that is DelTaskFiles subroutine to remove all task.* files from the destination folder.
      But this subroutine fails to unlink all task.* files from its folders AND SUB FOLDERS
      This sub routine should be done before renaming the directories(i.e before rename_dirs subroutine).I had tried to remove all files which starts with task from its folders and sub folders at destination directory .
      Here my code is not unlinking the task.* from the folders and subfolders
      Help me to fix it.If this subroutine is fixed no need to use my suggestion part

        Note that in programming, there is a huge difference between the word link, and the word unlink.

        The word link is commonly used for the linker program.

        The word unlink is commonly used for the system call named unlink, which also exists in Perl as unlink.

        You seem to want to use unlink, but you say link. This is highly confusing.

        You still have not answered my original question, as to who gave you that suggestion and why they gave the suggestion to you.

        If you are trying to get solutions for suggestions and help you got from another place, please stop doing this. This website is for learning and using Perl and not for doing your school and work assignments.

        As you have repeatedly ignored attempts to help you find learning resources, I can only think that you are acting in bad faith.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1188079]
Approved by beech
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2024-04-18 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found