Hey Monks, I am writing a script which read a text file and sorts the data in a more clinical way. i will explain in detail. say for ex we have a file called foo.txt. foo.txt contains the following:
The Rock|Cheer|Rock Bottom Triple H|Boo|Pedigree Stone Cold|Cheer|Stone Cold Stunner
Now my code should read the text file and sort the data in this way:
Wrestlername: The Rock Crowdreaction: Cheer Specialmove: RockBottom
i could only get this far. please let me know your ideas on how to do it.
#!/usr/bin/perl -w open(Handle,"D:\\scripts\\read.txt") || die "cannot read the file: $!" +; chomp(@row_data=<Handle>); close(Handle); print join (',',@row_data);
The output is as follows: The Rock|Cheer|Rock Bottom,Triple H|Boo|Pedigree,Stone Cold|Cheer|Ston +e Cold Stunner
Thanks
Irishboy
In reply to Script issue involves File Handling. by Irishboy24
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |