| [reply] |
As the previous commenter noted, you need to give us some examples of what you've tried so far, or, at least walk us through your thought process and how you think you'd approach that kind of problem. I'm more than happy to offer suggestions or take a look at some working code, but since you did note it was for an exam you'll learn best by doing. Give it a whirl and throw up some code along with some comments.
---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
| [reply] |
If you get help with your exam, then not only would it not be your exam anymore, it would be unfair to others taking the exam as well (assuming there are others taking the exam).
Here are is a hint -- DOS format usually means that each line ends with a carriage return AND a line feed. Search for those endings and you will know if your file is a DOS format file.
The other two tasks are way too basic to merit hints... hinting would give away the answer.
--
when small people start casting long shadows, it is time to go to bed
| [reply] |
<devil's_advocate>There is an argument that if all those taking the exam have access to the web then those that take advantage of that access ought to be rewarded for their initiative.<devil's_advocate>
However, as others have suggested, at PerlMonks we are disinclined to do people's homework for them and we are very disinclined to simply provide a solution when the OP shows no apparent effort at all!
Perl is environmentally friendly - it saves trees
| [reply] |
| [reply] |
Hi, josemero. It's actually not a big problem, but people here usually don't give out code you want without you showing some effort of your own. But well, since you are new to Perl, you first need to get the basic knowledge. You may want to start with perlintro. As to your specific problem, The Perl Cookbook provides a great help.You may be interested specially in Chapter 8: File Contents.
Please try it out your code. If you have some problem, or things don't work as you expect, feel free to post your question again. But, 1) provide the code you write, along with your exact problem and/or the part of the code you don't understand, 2) please be patient with your question and avoid to post multiple times.
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
| [reply] |
HI
for file name check u can u use regular expression
$FileName =~ m/^[_a-z]/i | [reply] |